Fix release build #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build GitHub pages | |
on: | |
workflow_dispatch: | |
push: | |
branches: [master, staging, trying] | |
paths: 'docs/**' | |
pull_request: | |
branches: [master] | |
paths: 'docs/**' | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Check for broken links | |
uses: lycheeverse/[email protected] | |
with: | |
args: --verbose --no-progress './**/*.md' | |
fail: true | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
# - name: Spellcheck | |
# uses: rojopolis/[email protected] | |
deploy: | |
# Only deploy on push to master | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
path: "repo" | |
- name: Setup mdBook | |
uses: peaceiris/actions-mdbook@v1 | |
with: | |
mdbook-version: "latest" | |
- name: Prepare output directory | |
run: | | |
mkdir -p output | |
- name: Build user guide | |
run: | | |
cd repo/docs/user-guide | |
mdbook build -d ../../../output/user-guide | |
- name: Build dev guide | |
run: | | |
cd repo/docs/dev-guide | |
mdbook build -d ../../../output/dev-guide | |
- name: Copy static content | |
run: | | |
cp -r repo/docs/static/* output | |
- name: Publish to GitHub pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./output | |
keep_files: true |