Skip to content

Build and deploy

Build and deploy #647

Workflow file for this run

name: Build and deploy
on:
schedule:
- cron: '1 1 */10 * *'
push:
branches:
- master
pull_request:
jobs:
build:
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '18.x'
- name: Gatsby Cache Folder
uses: actions/cache@v2
id: gatsby-cache-folder
with:
path: .cache
key: ${{ runner.os }}-cache-gatsby
restore-keys: |
${{ runner.os }}-cache-gatsby
- name: Gatsby Public Folder
uses: actions/cache@v2
id: gatsby-public-folder
with:
path: public/
key: ${{ runner.os }}-public-gatsby
restore-keys: |
${{ runner.os }}-public-gatsby
- run: npm install
- run: npm run build -- --log-pages
env:
PREFIX_PATHS: 'true'
PATH_PREFIX: '/vancouver'
GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES: 'true'
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.event_name != 'pull_request'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public