add mermaid to ci #10
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: Compile and Publish Test Pages and Releases | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
env: | |
MDBOOK_VERSION: "0.4.37" | |
MDBOOK_MERMAID_VERSION: "0.13.0" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install mdbook | |
run: | | |
mkdir ~/tools | |
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 ~/tools | |
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 ~/tools | |
echo ~/tools >> $GITHUB_PATH | |
- name: Build | |
run: | | |
cd docs | |
mdbook build | |
- uses: JamesIves/github-pages-deploy-action@4.1.7 | |
with: | |
branch: gh-pages | |
folder: docs/book |