-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (53 loc) · 1.64 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: CI - JS
on:
pull_request:
branches: [master]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: SETUP - Checkout code
uses: actions/checkout@v4
- name: SETUP - Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: npm
- name: SETUP - Install dependencies
run: npm ci --prefer-offline &> /dev/null
- name: ANALYZE - Run TSC
run: tsc -p tsconfig.json --noEmit
- name: ANALYZE - Run ESLint
run: npm run lint
deploy-staging:
name: Deploy to Staging
runs-on: ubuntu-latest
needs: lint
# on every branch that isnt master
if: github.ref != 'refs/heads/master'
steps:
- uses: actions/checkout@master
- uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID}}
github-token: ${{ secrets.GITHUB_TOKEN }}
github-comment: true
deploy-prod:
name: Deploy to Production
runs-on: ubuntu-latest
needs: lint
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@master
- uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID}}
github-token: ${{ secrets.GITHUB_TOKEN }}
github-comment: true
vercel-args: '--prod'