Update to mdbook v0.5 #143
This file contains hidden or 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: Deploy book | |
| on: | |
| push: | |
| workflow_dispatch: | |
| env: | |
| MDBOOK_VERSION: 0.5.1 | |
| MDBOOK_MERMAID_VERSION: 0.17.0 | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install mdbook | |
| run: | | |
| mkdir mdbook | |
| url="https://github.com/rust-lang/mdBook/releases/download/v${{ env.MDBOOK_VERSION }}/mdbook-v${{ env.MDBOOK_VERSION }}-x86_64-unknown-linux-gnu.tar.gz" | |
| curl -LfsS --proto '=https' --tlsv1.3 "$url" | tar -xz -C ./mdbook | |
| echo "$(pwd)/mdbook" >> "$GITHUB_PATH" | |
| - name: Install mdbook-mermaid | |
| run: | | |
| mkdir mdbook-mermaid | |
| url="https://github.com/badboy/mdbook-mermaid/releases/download/v${{ env.MDBOOK_MERMAID_VERSION }}/mdbook-mermaid-v${{ env.MDBOOK_MERMAID_VERSION }}-x86_64-unknown-linux-gnu.tar.gz" | |
| curl -LfsS --proto '=https' --tlsv1.3 "$url" | tar -xz -C ./mdbook-mermaid | |
| echo "$(pwd)/mdbook-mermaid" >> "$GITHUB_PATH" | |
| - name: Build the book | |
| run: | | |
| mdbook build | |
| touch book/.nojekyll | |
| - name: Upload book | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./book | |
| deploy: | |
| if: ${{ github.ref == 'refs/heads/master' }} | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| needs: build | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy book | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |