From 1adf4454296bf956691cd6278b8168a39df07b7c Mon Sep 17 00:00:00 2001 From: nazeh Date: Sun, 8 Sep 2024 11:19:47 +0300 Subject: [PATCH] docs: add mdbook build to github actions --- .github/workflows/rust.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index 85357b4..c6a2fe9 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -73,3 +73,21 @@ jobs: - name: Run docs run: cargo doc --workspace --all-features --no-deps --document-private-items --verbose + + - name: Install mdBook and mdBook-Mermaid + run: | + cargo install mdbook + cargo install mdbook-mermaid + mdbook-mermaid install ./docs/ + + - name: Cache mdBook build + id: cache-mdbook + uses: actions/cache@v3 + with: + path: path/to/your/book/book-output + key: ${{ runner.os }}-mdbook-${{ hashFiles('path/to/your/book/**') }} + restore-keys: | + ${{ runner.os }}-mdbook- + + - name: Build the book + run: mdbook build /docs/