Skip to content

Commit

Permalink
Use build cache and index page and unstable options for rust doc build
Browse files Browse the repository at this point in the history
  • Loading branch information
zbuc committed Apr 9, 2024
1 parent 15263a9 commit 9b5922a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/cargo-doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly-2024-03-21
- name: Install rust toolchain
# The script for rustdoc build requires nightly toolchain.
uses: dtolnay/rust-toolchain@nightly
# Loading cache takes ~15s, but saves us minutes of build.
- name: Load rust cache
uses: astriaorg/buildjet-rust-cache@v2.5.1
- name: Build API documentation
uses: actions-rs/cargo@v1
env:
RUSTDOCFLAGS: "--cfg docsrs"
RUSTDOCFLAGS: "--enable-index-page -Zunstable-options --cfg docsrs"
with:
command: doc
args: --all-features

- name: Push API documentation to GitHub Pages
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
Expand Down

0 comments on commit 9b5922a

Please sign in to comment.