Skip to content

Build and Deploy to GitHub Pages #1

Build and Deploy to GitHub Pages

Build and Deploy to GitHub Pages #1

name: Build and Deploy to GitHub Pages
on:
pull_request:
branches:
- main
types:
- closed
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install
- name: Convert YAML to HTML
run: yarn build-docs
- name: Publish to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: dist