Skip to content

Commit ef1b8c9

Browse files
committed
ci: Simplify Vercel deployment workflow configuration
1 parent dee8b87 commit ef1b8c9

1 file changed

Lines changed: 11 additions & 17 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
1-
name: "Deploy"
2-
1+
name: Deploy to Vercel
32
on:
43
push:
5-
branches:
6-
- main
4+
branches: [main]
75

86
jobs:
9-
vercel:
7+
deploy:
108
runs-on: ubuntu-latest
11-
name: "Deploy Automa Website"
12-
139
steps:
1410
- uses: actions/checkout@v2
15-
- uses: actions/setup-node@v1
11+
12+
# 使用官方的 Vercel Action 替代 CLI 命令
13+
- name: Deploy to Vercel
14+
uses: amondnet/vercel-action@v20
1615
with:
17-
node-version: '16'
18-
registry-url: https://registry.npmjs.org/
19-
20-
- name: "Deploy to Vercel"
21-
run: npx vercel --token ${VERCEL_TOKEN} --prod
22-
env:
23-
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
24-
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
25-
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
16+
vercel-token: ${{ secrets.VERCEL_TOKEN }}
17+
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
18+
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
19+
working-directory: ./

0 commit comments

Comments
 (0)