-
-
Notifications
You must be signed in to change notification settings - Fork 9
41 lines (32 loc) · 1.17 KB
/
deploy-to-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
name: Deploy to Vercel
on:
push:
branches:
- "**"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Check for duplicates
run: npx ts-node ./tests/checkDuplicates.ts
- name: Deploy to Vercel
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Alias deployment to custom domain
if: github.ref == 'refs/heads/master'
run: vercel alias ${{ steps.vercel-deployment.outputs.deployment-url }} chessguessr.com --token ${{ secrets.VERCEL_TOKEN }}
- name: Alias deployment to www subdomain
if: github.ref == 'refs/heads/master'
run: vercel alias ${{ steps.vercel-deployment.outputs.deployment-url }} www.chessguessr.com --token ${{ secrets.VERCEL_TOKEN }}