generated from nandiheath/gatsby-template-deprecated
-
Notifications
You must be signed in to change notification settings - Fork 43
58 lines (55 loc) · 1.72 KB
/
deploy.yaml
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
name: Build And Deploy
on:
push:
branches:
- master
- dev
# Nandi: disable the schedule build until we fix the GraphQL query
# schedule:
# - cron: '*/5 * * * *'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 16.x
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v2
with:
path: |
**/node_modules
.cache
public
key: ${{ runner.os }}-nodejs-${{ matrix.node-version }}-modules-${{ hashFiles('**/yarn.lock') }}-v-${{ hashFiles('src/**/*.js') }}-deploy-v2
- run: yarn install --frozen-lockfile
- run: yarn build:incremental
env:
GOOGLE_TRACKING_ID: ${{ secrets.GOOGLE_TRACKING_ID }}
NODE_ENV: ${{ secrets.NODE_ENV }}
DEBUG_MODE: false
- name: Deploy to Github Page
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./public
force_orphan: true
personal_token: ${{ secrets.DEPLOY_GITHUB_TOKEN }}
external_repository: vote4hk/wars.vote4.hk
cname: wars.vote4.hk
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
- name: Deploy to Github Page (EN)
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./public
force_orphan: true
personal_token: ${{ secrets.DEPLOY_GITHUB_TOKEN }}
external_repository: vote4hk/covid19.vote4.hk
cname: covid19.vote4.hk
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'