-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (46 loc) · 1.41 KB
/
deploy_to_env.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
name: Deploy to Vercel
on:
workflow_call:
inputs:
environment:
description: 'Environment to deploy to'
type: string
default: 'production'
secrets:
vercel_project_id:
description: 'Vercel project ID'
required: true
vercel_token:
description: 'Vercel token to use for deployment'
required: true
vercel_org_id:
description: 'Vercel organization ID'
required: true
jobs:
deploy-to-vercel:
name: Deploy to Vercel
runs-on: ubuntu-latest
env:
VERCEL_PROJECT_ID: ${{ secrets.vercel_project_id }}
VERCEL_ORG_ID: ${{ secrets.vercel_org_id }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'pnpm'
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.vercel_token }}
- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.vercel_token }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prod --token=${{ secrets.vercel_token }}