Skip to content

Commit c268de6

Browse files
committed
Add GitHub Actions workflow for Vercel auto-deployment
1 parent 8f3496c commit c268de6

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Vercel Production Deployment
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
env:
12+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
13+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
14+
15+
jobs:
16+
deploy:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: '20'
26+
27+
- name: Install Vercel CLI
28+
run: npm install -g vercel@latest
29+
30+
- name: Pull Vercel Environment Information
31+
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
32+
33+
- name: Build Project Artifacts
34+
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
35+
36+
- name: Deploy to Vercel
37+
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}

0 commit comments

Comments
 (0)