Skip to content

Add production workflow #454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 30, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Production

on:
push:
branches:
- main

jobs:
production:
name: Production
runs-on: ubuntu-20.04
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.0

- name: Checkout m
uses: actions/checkout@v2
with:
repository: cdr/m
ref: refs/heads/master
token: ${{ secrets.GH_ACCESS_TOKEN }}
submodules: true
fetch-depth: 0

- name: Deploy to Vercel (Production)
env:
VERCEL_ORG_ID: team_tGkWfhEGGelkkqUUm9nXq17r
VERCEL_PROJECT_ID: QmZRucMRh3GFk1817ZgXjRVuw5fhTspHPHKct3JNQDEPGd
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_PROD: true
run: ./ci/scripts/deploy_vercel.sh

- name: Slack alert on CI failure
uses: 8398a7/action-slack@v3
if: failure() && github.ref == 'refs/heads/master'
with:
status: ${{ job.status }}
fields: repo,message,author,workflow,action,eventName
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}