static-cms/.github/workflows/website-publish.yml
2022-09-30 22:46:45 -04:00

32 lines
727 B
YAML

name: Website Publish
on:
push:
paths:
- website/**
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'
cache-dependency-path: 'website/yarn.lock'
- name: Install
working-directory: website
run: yarn install --immutable
- name: Build
working-directory: website
run: yarn build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.ACCESS_TOKEN }}
publish_dir: website/dist