Skip to content

Merge pull request #54 from mbustama/maturity-auto-strategy #47

Merge pull request #54 from mbustama/maturity-auto-strategy

Merge pull request #54 from mbustama/maturity-auto-strategy #47

Workflow file for this run

name: Documentation Deployment
on:
push:
branches: [ "main" ]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run and latest queued
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build-and-deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: "3.12"
- name: Install documentation dependencies
run: pip install -r docs/requirements.txt
- name: Install magnus (editable)
# Needed so the jupyter-sphinx kernel that executes the docstring
# Examples (.. jupyter-execute::) can `import magnus`.
run: pip install -e .
- name: Register the Jupyter kernel used by jupyter-sphinx
run: python -m ipykernel install --user --name python3 --display-name "Python 3"
- name: Build HTML documentation
run: |
cd docs
make html
- name: Setup GitHub Pages
uses: actions/configure-pages@v6
- name: Upload HTML artifact
# This action stopped including dotfiles in v4. Checked rather than assumed: the
# build here produces exactly one, `.buildinfo`, which is Sphinx's incremental-build
# cache -- a full rebuild happens when it is absent, and CI builds from scratch every
# time, so losing it changes nothing. There is no `.nojekyll`, and none is needed:
# deploying through Actions serves the artifact as-is rather than passing it to
# Jekyll, which is why `_static/` works despite the leading underscore. If a page
# ever does need a dotfile, v5 added an `include-hidden-files` input.
uses: actions/upload-pages-artifact@v5
with:
# Ensure this path matches where Sphinx outputs your HTML files
path: 'docs/build/html'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5