-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (34 loc) · 1.22 KB
/
self.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: 自主实现简单的vercel-cil部署
env:
vercel-token: ${{ secrets.vercel_token }}
vercel-org-id: ${{ secrets.vercel_orgId}}
vercel-project-id: ${{ secrets.vercel_projectId}}
on:
push:
branches:
- dev
# 参考资料
# https://vercel.com/guides/how-can-i-use-github-actions-with-vercel
# https://vercel.com/guides/how-to-alias-a-preview-deployment-using-the-cli
jobs:
Deploy-Production:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: 开启 corepack
run: corepack enable && corepack install
- name: 检查pnpm版本
run: pnpm -v
- name: 安装整个项目的依赖
run: pnpm i
- name: 用npm安装vercel cli工具
run: |
npm i -g vercel@latest
- name: 检查vercel cli版本
run: vercel -v
- name: 拉取vercel环境变量
run: vercel pull --yes --environment=production --token=${{ secrets.vercel_token }}
- name: 打包monorepo-3
run: vercel build --yes --cwd ./ --local-config ./packages/monorepo-3/vercel.json --prod --token=${{ secrets.VERCEL_TOKEN }}
- name: 部署到vercel内
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}