Merge pull request #42 from sandialabs/bc-name-consistency #27
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
# Sample workflow for building and deploying a mdBook site to GitHub Pages | |
# | |
# To get started with mdBook see: https://rust-lang.github.io/mdBook/index.html | |
# | |
name: Deploy mdBook site to Pages | |
on: | |
pull_request: | |
branches: main | |
push: | |
branches: main | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: write | |
jobs: | |
# Build job | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
default: true | |
toolchain: stable | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: mdbook | |
run: cargo install mdbook mdbook-katex | |
- name: pancax | |
run: pip install -e .[cpu,docs,viz] pancax | |
- name: pydoc-markdown | |
run: | | |
pip install pydoc-markdown | |
mkdir book/api | |
pydoc-markdown -I . -p pancax --render-toc > book/api/pancax.md | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v5 | |
- name: Build with mdBook | |
run: mdbook build | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./book | |
# Deployment job | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
publish_branch: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./book/build | |
force_orphan: true |