Sphinx: Render + publish docs #4
Workflow file for this run
This file contains hidden or 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: "Sphinx: Render + publish docs" | |
on: | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Install hatch | |
run: pipx install hatch | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: "pip" | |
- name: Test doctests | |
run: hatch run docs:test | |
- name: Build doc | |
run: hatch run docs:build | |
- name: Upload to GitHub pages | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: docs/_build | |
- name: Deploy to GitHub Pages | |
uses: actions/deploy-pages@v4 |