From a021813f18fd5497ba563ad5c660d900fea90f78 Mon Sep 17 00:00:00 2001 From: SHAcollision <127778313+SHAcollision@users.noreply.github.com> Date: Tue, 25 Mar 2025 08:21:59 -0400 Subject: [PATCH] fix(docs): fix cache action (#93) --- .github/workflows/docs.yml | 76 +++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 618e1d8..ca90d1c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,7 +2,7 @@ name: Documentation on: push: - branches: [ main ] + branches: [main] permissions: contents: write @@ -11,47 +11,47 @@ jobs: docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - - name: Cache mdbook installation - uses: actions/cache@v2 - with: - path: ~/.cargo/bin/mdbook - key: ${{ runner.os }}-mdbook + - name: Cache mdbook installation + uses: actions/cache@v3 + with: + path: ~/.cargo/bin/mdbook + key: ${{ runner.os }}-mdbook - - name: Cache mdbook-mermaid installation - uses: actions/cache@v2 - with: - path: ~/.cargo/bin/mdbook - key: ${{ runner.os }}-mdbook-mermaid + - name: Cache mdbook-mermaid installation + uses: actions/cache@v3 + with: + path: ~/.cargo/bin/mdbook + key: ${{ runner.os }}-mdbook-mermaid - - name: Install mdBook if not installed already - run: | - if [ ! -f ~/.cargo/bin/mdbook ]; then - cargo install mdbook - fi + - name: Install mdBook if not installed already + run: | + if [ ! -f ~/.cargo/bin/mdbook ]; then + cargo install mdbook + fi - - name: Install mdBook-mermaid if not installed already - run: | - if [ ! -f ~/.cargo/bin/mdbook-mermaid ]; then - cargo install mdbook-mermaid - fi + - name: Install mdBook-mermaid if not installed already + run: | + if [ ! -f ~/.cargo/bin/mdbook-mermaid ]; then + cargo install mdbook-mermaid + fi - - name: Cache mdBook build - id: mdbook-build-cache - uses: actions/cache@v3 - with: - path: ./docs/book/ - key: ${{ runner.os }}-mdbook-${{ hashFiles('./docs/**') }} - restore-keys: | - ${{ runner.os }}-mdbook- + - name: Cache mdBook build + id: mdbook-build-cache + uses: actions/cache@v3 + with: + path: ./docs/book/ + key: ${{ runner.os }}-mdbook-${{ hashFiles('./docs/**') }} + restore-keys: | + ${{ runner.os }}-mdbook- - - name: Build the book - if: steps.mdbook-build-cache.outputs.cache-hit != 'true' - run: mdbook build ./docs/ + - name: Build the book + if: steps.mdbook-build-cache.outputs.cache-hit != 'true' + run: mdbook build ./docs/ - - name: Deploy book to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs/book/ + - name: Deploy book to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/book/