@@ -35,24 +35,21 @@ jobs:
3535 runs-on : ubuntu-latest
3636 steps :
3737 - uses : classabbyamp/treeless-checkout-action@v1
38- - name : Download latest mdbook, mdbook-toc and mdbook-admonish
39- run : |
40- MDBOOK_VERSION="$(basename $(curl -Ls -o /dev/null -w %{url_effective} https://github.com/rust-lang/mdBook/releases/latest))"
41-
42- wget -q -O- "https://github.com/rust-lang/mdBook/releases/download/${MDBOOK_VERSION}/mdbook-${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz" | tar -xzf - -C .
43-
44- MDBOOK_TOC_VERSION="$(basename $(curl -Ls -o /dev/null -w %{url_effective} https://github.com/badboy/mdbook-toc/releases/latest))"
45-
46- wget -q -O- "https://github.com/badboy/mdbook-toc/releases/download/${MDBOOK_TOC_VERSION}/mdbook-toc-${MDBOOK_TOC_VERSION}-x86_64-unknown-linux-gnu.tar.gz" | tar -xzf - -C .
47-
48- MDBOOK_ADMONISH_VERSION="$(basename $(curl -Ls -o /dev/null -w %{url_effective} https://github.com/tommilligan/mdbook-admonish/releases/latest))"
49-
50- wget -q -O- "https://github.com/tommilligan/mdbook-admonish/releases/download/${MDBOOK_ADMONISH_VERSION}/mdbook-admonish-${MDBOOK_ADMONISH_VERSION}-x86_64-unknown-linux-gnu.tar.gz" | tar -xzf - -C .
38+ - name : Setup Nix
39+ uses : nixbuild/nix-quick-install-action@v28
40+ - name : Restore and cache Nix store
41+ uses : nix-community/cache-nix-action@v5
42+ # See https://github.com/nix-community/cache-nix-action/blob/main/README.md#example-steps
43+ # Cache purging is delegated to GitHub (this means a maximum 10G of data accessed
44+ # less than a week ago).
45+ with :
46+ primary-key : nix-${{ hashFiles('**/*.nix') }}
47+ restore-prefixes-first-match : nix-
5148 - name : Setup Pages
5249 id : pages
5350 uses : actions/configure-pages@v4
5451 - name : Build with mdBook
55- run : PATH="$GITHUB_WORKSPACE:$PATH" ./ book.sh build
52+ run : ./nix- book.sh build
5653 - name : Upload artifact
5754 uses : actions/upload-pages-artifact@v3
5855 with :
0 commit comments