Skip to content

Commit

Permalink
feat(gha): generate API doc
Browse files Browse the repository at this point in the history
Introduces a new GitHub Actions workflow `doc.yml` which generates API
documentation and uploads it to GitHub Pages.
  • Loading branch information
kikuomax committed Nov 22, 2024
1 parent 5f50621 commit 849679c
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Generate API doc

on:
push:
branches:
- main

jobs:
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Generate API doc
run: cargo doc --lib --no-deps --all-features
- name: Upload API doc as artifact
id: artifact
uses: actions/upload-pages-artifact@v3
with:
path: target/doc

deploy:
needs: doc

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 849679c

Please sign in to comment.