Build & Publish Documentation #5
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 & Publish Documentation | |
on: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
generate-and-publish-mkdocs: | |
name: Build and Publish Updated Docs | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pages: write | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
egress-policy: audit | |
- name: Checkout repository | |
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- name: Install docs required dependencies | |
run: pip install --require-hashes -r doc/requirements-docs.txt | |
- name: Build website | |
run: | | |
cd doc | |
mkdocs build | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./doc/site |