-
-
Notifications
You must be signed in to change notification settings - Fork 208
35 lines (30 loc) · 773 Bytes
/
Copy pathdeploy-on-release.yml
File metadata and controls
35 lines (30 loc) · 773 Bytes
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
name: "Deploy"
on:
release:
types:
- published
push:
branches:
- dev
workflow_dispatch:
jobs:
vercel:
runs-on: ubuntu-latest
name: "Deploy Front-End"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "14"
registry-url: https://registry.npmjs.org/
- name: "Deploy to Vercel"
run: |
prodRun=""
if [[ ${GITHUB_REF} == "refs/heads/main" ]]; then
prodRun="--prod"
fi
npx vercel --token ${VERCEL_TOKEN} $prodRun
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}