-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (41 loc) · 2.04 KB
/
use-vercel-cli-build-try-2.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
45
46
47
48
49
50
51
52
53
54
55
name: 基于Build Output API的部署
env:
vercel-token: ${{ secrets.vercel_token }}
VERCEL_ORG_ID: ${{ secrets.vercel_orgId }}
VERCEL_PROJECT_ID: ${{ secrets.vercel_projectId }}
on:
push:
branches:
- dev-notuse
# 参考资料
# https://vercel.com/blog/build-output-api
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 --cwd ./packages/monorepo-3 --local-config ./packages/monorepo-3/vercel.single.json --environment=production --token=${{ secrets.vercel_token }}
- name: 连接现有的项目
run: vc link --yes --cwd=./packages/monorepo-3 --project=vercel-monorepo-test-1-zn20 -A ./packages/monorepo-3/vercel.single.json
- name: 拉取vercel环境变量
run: vc pull --yes --cwd=./packages/monorepo-3 -A ./packages/monorepo-3/vercel.single.json --environment=production --token=${{ secrets.vercel_token }}
# run: vc pull --cwd=./packages/monorepo-3 -A ./packages/monorepo-3/vercel.single.json --yes --token=${{ secrets.vercel_token }}
- name: pnpm打包monorepo-3
run: pnpm -F @ruan-cat-vercel-monorepo-test/monorepo-3 docs:build
- name: vercel打包monorepo-3
run: vc build --yes --cwd=./packages/monorepo-3 -A ./packages/monorepo-3/vercel.single.json --prod --token=${{ secrets.VERCEL_TOKEN }}
# run: vc build --cwd=./packages/monorepo-3 -A ./packages/monorepo-3/vercel.single.json --yes --token=${{ secrets.VERCEL_TOKEN }}
- name: 部署到vercel内
run: vc deploy --prebuilt --cwd=./packages/monorepo-3 -A ./packages/monorepo-3/vercel.single.json --prod --token=${{ secrets.VERCEL_TOKEN }}