Skip to content

Publish documentation #50

Publish documentation

Publish documentation #50

Workflow file for this run

# SPDX-FileCopyrightText: 2025 InOrbit, Inc.
#
# SPDX-License-Identifier: MIT
name: Publish documentation
on:
# Trigger when build-and-publish workflow completes
workflow_run:
workflows: ["Build and Publish"]
types:
- completed
branches:
- main
# Allow manual triggering of the workflow
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
# Avoid race conditions by allowing only one build to run at a time
# Other builds cannot cancel this one, and are queued instead
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
# Only run if manually dispatched, or if build-and-publish workflow succeeded AND created a release
if: |
github.event_name == 'workflow_dispatch' || (
github.event_name == 'workflow_run' &&
github.event.workflow_run.conclusion == 'success' &&
contains(github.event.workflow_run.head_commit.message, 'Bump version')
)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install docs dependencies
run: |
python -m pip install .[docs]
- name: Build Sphinx site
run: |
sphinx-build -b html docs/sphinx docs/sphinx/_build/html
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/sphinx/_build/html
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- id: deployment
uses: actions/deploy-pages@v4