-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (32 loc) · 1.18 KB
/
publish.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
name: Publish
on:
- push
- pull_request
jobs:
publish:
name: Publish Specification
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Deploy Preview
if: ${{ github.event_name == 'pull_request' }}
uses: amondnet/[email protected]
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
scope: ${{ secrets.VERCEL_SCOPE }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID}}
vercel-project-name: ${{ secrets.VERCEL_PROJECT_NAME }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}}
- name: Deploy to Production
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: amondnet/[email protected]
with:
vercel-args: '--prod'
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
scope: ${{ secrets.VERCEL_SCOPE }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID}}
vercel-project-name: ${{ secrets.VERCEL_PROJECT_NAME }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}}