name: Deploy documentation
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
deploy:
runs-on: windows-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Rust nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
- name: Install mdBook
run: cargo install mdbook
- name: Build documentation
run: |
mdbook build hudbook
cargo doc --all --no-deps
mkdir -p target/all-docs/rustdoc
Copy-Item -Path "target/doc/*" -Destination "target/all-docs/rustdoc" -Recurse
Copy-Item -Path "target/hudbook/*" -Destination "target/all-docs" -Recurse
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'target/all-docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1