Skip to content

Commit f3dc615

Browse files
committed
next
1 parent ccb8ee2 commit f3dc615

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

.github/workflows/generate-docs.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,27 @@ jobs:
2020
override: true
2121
components: rust-docs
2222

23-
- name: Generate Rust API documentation (doc-only workspace)
24-
working-directory: .doc
23+
- name: Cache Cargo registry
24+
uses: actions/cache@v3
25+
with:
26+
path: |
27+
~/.cargo/registry
28+
~/.cargo/git
29+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
30+
31+
- name: Cache target directory
32+
uses: actions/cache@v3
33+
with:
34+
path: target
35+
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }}
36+
37+
- name: Generate Rust API documentation (docs-only workspace)
2538
run: |
2639
export RUSTDOCFLAGS="--cfg docsrs"
27-
cargo +nightly doc --no-deps --workspace
40+
cargo +nightly doc --no-deps --workspace --manifest-path .doc/Cargo.toml
2841
2942
- name: Deploy to GitHub Pages
3043
uses: peaceiris/actions-gh-pages@v3
3144
with:
3245
github_token: ${{ secrets.GITHUB_TOKEN }}
33-
publish_dir: .doc/target/doc
46+
publish_dir: ./target/doc

0 commit comments

Comments
 (0)