Skip to content

Commit

Permalink
Attempt at installing mermaid plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
YuriyDurov committed May 29, 2024
1 parent 9f81e57 commit b715e69
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,26 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install latest mdbook
run: |
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
mkdir mdbook
curl -sSL $url | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- uses: jontze/action-mdbook@v3
with:
token: ${{secrets.GITHUB_TOKEN}}
use-mermaid: true
# - name: Install latest mdbook
# run: |
# tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
# url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
# mkdir mdbook
# curl -sSL $url | tar -xz --directory=./mdbook
# echo `pwd`/mdbook >> $GITHUB_PATH
- name: Build Book
run: |
# This assumes your book is in the root of your repository.
# Just add a `cd` here if you need to change to another directory.
cd docs
mdbook build
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: 'docs/book'
- name: Deploy to GitHub Pages
id: deployment
Expand Down
8 changes: 7 additions & 1 deletion docs/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,10 @@ title = "Blazor.Auth"

[output.html]
git-repository-url = "https://github.com/BitzArt/Blazor.Auth"
git-repository-icon = "fa-github"
git-repository-icon = "fa-github"

[preprocessor.mermaid]
command = "mdbook-mermaid"

[output.html]
additional-js = ["mermaid.min.js", "mermaid-init.js"]

0 comments on commit b715e69

Please sign in to comment.