-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (31 loc) · 1.08 KB
/
build-and-deploy.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
name: Build and Deploy CI
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
branches: [master]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
if: ${{ (github.event_name == 'workflow_dispatch') || (contains(github.event.head_commit.message, 'chore(release)')) || (github.event_name == 'pull_request') }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "lts/gallium"
cache: "yarn"
- run: yarn install --frozen-lockfile
- run: yarn build
env:
GOOGLE_PRIVATE_KEY: ${{secrets.GOOGLE_PRIVATE_KEY}}
GOOGLE_SERVICE_ACCOUNT_EMAIL: ${{secrets.GOOGLE_SERVICE_ACCOUNT_EMAIL}}
NODEJS_HELPERS: 0
- name: Deploy to Vercel
uses: BetaHuhn/deploy-to-vercel-action@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}