Skip to content

Refactor code structure for improved readability and maintainability #40

Refactor code structure for improved readability and maintainability

Refactor code structure for improved readability and maintainability #40

Workflow file for this run

name: Docs
# Builds the Sphinx site on every push to main and on pull requests that touch
# documentation. `make html` runs with -W, so a broken cross-link fails the
# build — on a PR that is the whole point (catch it before it ships); only
# pushes to main go on to publish.
on:
push:
branches: [main]
pull_request:
paths:
- "**/*.md"
- "docs_site/**"
- ".github/workflows/docs.yml"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
cache-dependency-path: docs_site/requirements.txt
- name: Install docs dependencies
run: pip install -r docs_site/requirements.txt
- name: Build the Sphinx site
run: make -C docs_site html
- uses: actions/configure-pages@v5
if: github.event_name != 'pull_request'
with:
enablement: true
- uses: actions/upload-pages-artifact@v3
if: github.event_name != 'pull_request'
with:
path: docs_site/_build/html
deploy:
needs: build
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4