Skip to content

CI: Build and deploy docs to GitHub pages #10

CI: Build and deploy docs to GitHub pages

CI: Build and deploy docs to GitHub pages #10

Workflow file for this run

name: docs
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: pip
- name: Install Hatch
uses: pypa/hatch@install
- name: Build docs
run: hatch run docs:build
- name: Enable GitHub Pages
uses: actions/configure-pages@v5
- name: Upload docs
uses: actions/upload-pages-artifact@v3
with:
name: docs
path: './docs/_build/html'
- name: Deploy docs
id: deployment
uses: actions/deploy-pages@v4