chore: Update release_binaries.yml workflow #55
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: Book Pages | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- 'docs/**' | |
- '.github/workflows/book.yml' | |
jobs: | |
book: | |
name: Book | |
runs-on: ubuntu-latest | |
env: | |
MDBOOK_VERSION: '0.4.21' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install mdbook | |
run: | | |
curl -L https://github.com/rust-lang/mdBook/releases/download/v$MDBOOK_VERSION/mdbook-v$MDBOOK_VERSION-x86_64-unknown-linux-gnu.tar.gz | tar xz -C ~/.cargo/bin | |
- name: Build | |
run: mdbook build | |
working-directory: docs | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: book | |
path: target/book | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
needs: book | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: book | |
- uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: . | |
force_orphan: true | |
# The following lines assign commit authorship to the official | |
# GH-Actions bot for deploys to `gh-pages` branch: | |
# https://github.com/actions/checkout/issues/13#issuecomment-724415212 | |
# The GH actions bot is used by default if you didn't specify the two fields. | |
# You can swap them out with your own user credentials. | |
cname: docs.xyz666.org | |
user_name: zwong91 | |
user_email: yzbingchuan@gmail.com |