This repository has been archived by the owner on Dec 9, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (54 loc) · 1.64 KB
/
__deploy-vercel.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
name: 'Deploy to Vercel'
on:
workflow_call:
inputs:
name:
description: >
GitHub environment name
type: string
required: true
production:
description: Deploy production?
type: boolean
required: false
default: false
secrets:
VERCEL_ORG_ID:
description: 'The Vercel ORG ID'
required: true
VERCEL_PROJECT_ID:
description: 'The Vercel Project Id'
required: true
VERCEL_TOKEN:
description: 'The Vercel API token'
required: true
concurrency:
group: deploy-vercel--${{ github.workflow }}-${{ github.ref }}--${{ inputs.name }}
permissions:
contents: read
deployments: write
pull-requests: write
jobs:
deploy:
name: Deploy ${{ inputs.name }} to Vercel (Production = ${{ inputs.production }})
runs-on: ubuntu-latest
environment:
name: ${{ inputs.name }}
url: ${{ steps.vercel.outputs.PREVIEW_URL }}
steps:
- name: Check out repository
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
with:
fetch-depth: 0
- name: Deploy to Vercel
id: vercel
uses: BetaHuhn/deploy-to-vercel-action@0f16bc3af7db7d5171bf68bff6f82679de195113 # v1
with:
GITHUB_DEPLOYMENT_ENV: ${{ inputs.name }}
GITHUB_DEPLOYMENT: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_LABELS: vercel
PRODUCTION: ${{ inputs.production }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}