File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy to Vercel
2+
3+ on :
4+ push :
5+ branches :
6+ - " **"
7+
8+ env :
9+ VERCEL_ORG_ID : ${{ secrets.VERCEL_ORG_ID }}
10+ VERCEL_PROJECT_ID : ${{ secrets.VERCEL_PROJECT_ID }}
11+
12+ jobs :
13+ deploy :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Checkout
17+ uses : actions/checkout@v4
18+
19+ - name : Setup Node
20+ uses : actions/setup-node@v4
21+ with :
22+ node-version : 20
23+
24+ - name : Install Vercel CLI
25+ run : npm i -g vercel
26+
27+ - name : Pull Vercel Environment Information (production)
28+ if : github.ref == 'refs/heads/main'
29+ run : vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
30+
31+ - name : Build (production)
32+ if : github.ref == 'refs/heads/main'
33+ run : vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
34+
35+ - name : Deploy (production)
36+ if : github.ref == 'refs/heads/main'
37+ run : vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
38+
39+ - name : Pull Vercel Environment Information (preview)
40+ if : github.ref != 'refs/heads/main'
41+ run : vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
42+
43+ - name : Build (preview)
44+ if : github.ref != 'refs/heads/main'
45+ run : vercel build --token=${{ secrets.VERCEL_TOKEN }}
46+
47+ - name : Deploy (preview)
48+ if : github.ref != 'refs/heads/main'
49+ run : vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
You can’t perform that action at this time.
0 commit comments