swag-disputes/.github/workflows/gh-pages.yaml
2024-08-13 14:10:26 +07:00

35 lines
733 B
YAML

name: gh-pages
on:
push:
branches:
- 'master'
- 'main'
env:
NODEJS_VERSION: '16'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODEJS_VERSION }}
cache: npm
- run: npm install
- name: Build
run: npm run build
- name: Build static
run: npm run docs
- name: Publish ReDoc on Github Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./static