-
Notifications
You must be signed in to change notification settings - Fork 24
62 lines (53 loc) · 2.04 KB
/
vercel-deploy.yml
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
56
57
58
59
60
61
62
name: Vercel deploy
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
on:
workflow_call:
inputs:
environment:
required: true
type: string
extra_args:
required: false
type: string
jobs:
Deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Enable corepack
run: corepack enable
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install Dependencies
run: pnpm install
- name: Setup packages (Build)
run: pnpm build
- name: Install Vercel CLI
run: npm install --global vercel@37.6.1
- name: Pull Vercel Environment Information (Docs)
run: vercel pull --yes --environment=${{ inputs.environment }} --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_DOCS }}
- name: Build Project Artifacts (Docs)
run: vercel build ${{ inputs.extra_args }} --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_DOCS }}
- name: Deploy Project Artifacts to Vercel (Docs)
run: vercel deploy ${{ inputs.extra_args }} --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_DOCS }}
- name: Pull Vercel Environment Information (Example)
run: vercel pull --yes --environment=${{ inputs.environment }} --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_EXAMPLE }}
- name: Build Project Artifacts (Example)
run: vercel build ${{ inputs.extra_args }} --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_EXAMPLE }}
- name: Deploy Project Artifacts to Vercel (Example)
run: vercel deploy ${{ inputs.extra_args }} --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_EXAMPLE }}