Merge pull request #734 from Veykril/veykril/push-txytyxrsumuu #619
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 | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
paths: | |
- "book/**" | |
- ".github/workflows/book.yml" | |
jobs: | |
book: | |
name: Book | |
runs-on: ubuntu-latest | |
env: | |
MDBOOK_VERSION: "0.4.40" | |
MDBOOK_LINKCHECK_VERSION: "0.7.7" | |
MDBOOK_MERMAID_VERSION: "0.13.0" | |
steps: | |
- uses: actions/checkout@v4 | |
- 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 | |
curl -L https://github.com/badboy/mdbook-mermaid/releases/download/v$MDBOOK_MERMAID_VERSION/mdbook-mermaid-v$MDBOOK_MERMAID_VERSION-x86_64-unknown-linux-gnu.tar.gz | tar xz -C ~/.cargo/bin | |
curl -L https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/v$MDBOOK_LINKCHECK_VERSION/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip -O | |
unzip mdbook-linkcheck.x86_64-unknown-linux-gnu.zip -d ~/.cargo/bin | |
chmod +x ~/.cargo/bin/mdbook-linkcheck | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v5 | |
- name: Build | |
run: mdbook build | |
working-directory: book | |
- name: Upload static files as artifact | |
id: deployment | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./book/book | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
needs: book | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
concurrency: | |
group: github-pages | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |