Skip to content

Commit 54642d1

Browse files
author
微信公众号:储凡
authored
Merge pull request #104 from 142vip/fix/vercel
fix(GitHub Actions): 修复`CD`流水线中`vercel`命令使用异常,避免冗余安装模块
2 parents 14a322e + e264c49 commit 54642d1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/CD.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,18 @@ jobs:
8888

8989
# # 注意: 这里的操作时间vercel平台配置的命令拉取下来,执行
9090
- name: Pull Vercel Environment Information
91-
run: npm i -g vercel && vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
91+
run: |
92+
npx vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
9293
9394
# # 执行vercel平台配置的命令
9495
- name: Build Project Artifacts
95-
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
96+
run: |
97+
npx vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
9698
9799
# # dist文件同步到vercel平台
98100
- name: Deploy Project Artifacts to Vercel
99-
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
101+
run: |
102+
npx vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
100103
101104
# # 版本发布
102105
release:

0 commit comments

Comments
 (0)