Skip to content

Commit 409897a

Browse files
committed
Skip mdbook install in CI when already cached
Use 'which' to check if the binary exists before running cargo install, avoiding both install failures and unnecessary recompilation on cache hits.
1 parent affc180 commit 409897a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ jobs:
4242
4343
- name: Install mdbook and dependencies
4444
run: |
45-
cargo install mdbook
46-
cargo install mdbook-mermaid
45+
which mdbook || cargo install mdbook
46+
which mdbook-mermaid || cargo install mdbook-mermaid
4747
4848
- name: Build documentation
4949
run: cargo xtask deploy

0 commit comments

Comments
 (0)