File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy to Vercel
2+
3+ on :
4+ push :
5+ branches :
6+ - main # 或者你的默认分支名
7+ workflow_dispatch : # 允许手动触发
8+
9+ env :
10+ VERCEL_ORG_ID : ${{ secrets.VERCEL_ORG_ID }}
11+ VERCEL_PROJECT_ID : ${{ secrets.VERCEL_PROJECT_ID }}
12+
13+ jobs :
14+ deploy :
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - uses : actions/checkout@v4
19+ with :
20+ fetch-depth : 2
21+
22+ - name : Setup Node.js
23+ uses : actions/setup-node@v4
24+ with :
25+ node-version : ' 20'
26+
27+ - name : Install dependencies
28+ run : npm install
29+
30+ - name : Install Vercel CLI
31+ run : npm install --global vercel@latest
32+
33+ - name : Pull Vercel Environment Information
34+ run : vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
35+
36+ - name : Build Project Artifacts
37+ run : vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
38+
39+ - name : Deploy Project Artifacts to Vercel
40+ run : vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
You can’t perform that action at this time.
0 commit comments