2023-02-09 18:02:57 +08:00
|
|
|
name: Deploy Docs to GitHub Pages
|
|
|
|
|
2023-02-09 23:11:18 +08:00
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
2023-02-09 18:02:57 +08:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- '/v*'
|
|
|
|
- 'develop'
|
|
|
|
paths:
|
|
|
|
- 'docs/'
|
|
|
|
|
2023-02-09 23:11:18 +08:00
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
|
2023-02-09 18:02:57 +08:00
|
|
|
concurrency:
|
|
|
|
group: docs
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
name: Deploy to GitHub Pages
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: ./docs
|
|
|
|
steps:
|
|
|
|
# Setup
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 18
|
|
|
|
cache: yarn
|
|
|
|
cache-dependency-path: ./docs/yarn.lock
|
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn install --frozen-lockfile
|
|
|
|
|
|
|
|
# Build static docs
|
|
|
|
- name: Build all versions
|
|
|
|
run: ./build.sh
|
|
|
|
- name: Build website
|
|
|
|
run: yarn build
|
|
|
|
|
|
|
|
# Deploy
|
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
publish_dir: ./docs/build
|