Updating workflow and various stuff (#151) #68
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
name: build and deploy docs | |
on: | |
push: | |
branches: | |
- master | |
# Uncomment paths to only trigger on changes to docs | |
# paths: | |
# - "docs/**" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
components: clippy | |
- name: Install mdBook | |
run: cargo install mdbook | |
- name: Build mdBook | |
run: mdbook build | |
working-directory: docs | |
- name: Copy CNAME file | |
run: cp docs/CNAME docs/book/ | |
# Note: Ensure 'CNAME' file is at the root of the 'docs' directory | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: 'docs/book' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |