Skip to content

Deploy Documentation #49

Deploy Documentation

Deploy Documentation #49

Workflow file for this run

name: Deploy Documentation
# Docs deploy only when a public version ships: after the "Publish to PyPI"
# workflow finishes successfully, or on a manual run. Routine pushes to main
# (and work on develop) do NOT update the public site.
on:
workflow_run:
workflows: ["Publish to PyPI"]
types: [completed]
workflow_dispatch: # allow manual rebuilds
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
# Only build on a successful publish, or when triggered manually.
if: >
github.event_name == 'workflow_dispatch'
|| github.event.workflow_run.conclusion == 'success'
steps:
- uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
- name: Set up Python
run: uv python install 3.12
- name: Install dependencies
run: uv sync --group docs
- name: Build documentation
run: uv run mkdocs build
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: site
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
# Canonical public URL; deploy-pages' page_url output reports GitHub's
# internal *.pages.github.io alias for org repos, so hardcode it.
url: https://pnnl.github.io/comcheckweb-api-python/
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5