Skip to content

Commit

Permalink
docs: generate api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mablin7 committed Nov 26, 2023
1 parent 500dd8b commit 3f581a5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- main
paths: ["docs/**/*"]
paths: ["docs/**/*", "src/**/*.rs"]
workflow_dispatch:

jobs:
Expand All @@ -29,9 +29,23 @@ jobs:
with:
toolchain: stable

# Cache cargo registry
- uses: actions/cache@v2
with:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
path: ~/.cargo/registry
restore-keys: |
${{ runner.os }}-cargo-
- run: cargo install mdbook
- run: cargo install mdbook-mermaid

- name: Build API docs
run: cargo doc --no-deps --all-features --all --exclude dies-protos

- name: Copy API docs to docs
run: cp -r target/doc docs/src/api

- run: mdbook build
working-directory: ./docs

Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
book
src/api

0 comments on commit 3f581a5

Please sign in to comment.