Skip to content

Rustdoc

Rustdoc #5

Workflow file for this run

name: Rustdoc
on:
workflow_dispatch:
push:
branches:
- main
permissions:
contents: write
concurrency:
group: rustdoc-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
jobs:
rustdoc:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
targets: wasm32-unknown-unknown
components: rust-src
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-
# Build the rust crate docs
- name: Build Documentation
run: cargo +nightly -Zgitoxide -Zgit doc --all --no-deps --lib
env:
RUSTDOCFLAGS: "-Z unstable-options --enable-index-page"
- name: Deploy Docs
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: target/doc