docs: Fix example #245
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: rustdoc | |
on: | |
push: | |
branches: | |
- dev | |
paths-ignore: | |
- "**.md" | |
- LICENSE | |
- .github/FUNDING.yml | |
- .gitignore | |
jobs: | |
rustdoc: | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: -D warnings | |
CARGO_INCREMENTAL: 0 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
components: rust-src | |
- name: Cache cargo output | |
uses: Swatinem/rust-cache@v1 | |
- name: Build Documentation | |
uses: actions-rs/cargo@v1 | |
with: | |
command: doc | |
args: --features amalgation,nightly -Zrustdoc-map | |
env: | |
RUSTDOCFLAGS: --cfg _doc | |
- name: Deploy Docs | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: gh-pages | |
publish_dir: ./target/doc | |
force_orphan: true |