Skip to content

Commit 5ced5b4

Browse files
Add production workflow (coder#454)
* Add production workflow * Update workflow name * Remove unused id
1 parent f64fc6e commit 5ced5b4

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/production.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Production
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
production:
10+
name: Production
11+
runs-on: ubuntu-20.04
12+
steps:
13+
- name: Cancel Previous Runs
14+
uses: styfle/cancel-workflow-action@0.9.0
15+
16+
- name: Checkout m
17+
uses: actions/checkout@v2
18+
with:
19+
repository: cdr/m
20+
ref: refs/heads/master
21+
token: ${{ secrets.GH_ACCESS_TOKEN }}
22+
submodules: true
23+
fetch-depth: 0
24+
25+
- name: Deploy to Vercel (Production)
26+
env:
27+
VERCEL_ORG_ID: team_tGkWfhEGGelkkqUUm9nXq17r
28+
VERCEL_PROJECT_ID: QmZRucMRh3GFk1817ZgXjRVuw5fhTspHPHKct3JNQDEPGd
29+
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
30+
VERCEL_PROD: true
31+
run: ./ci/scripts/deploy_vercel.sh
32+
33+
- name: Slack alert on CI failure
34+
uses: 8398a7/action-slack@v3
35+
if: failure() && github.ref == 'refs/heads/master'
36+
with:
37+
status: ${{ job.status }}
38+
fields: repo,message,author,workflow,action,eventName
39+
env:
40+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 commit comments

Comments
 (0)