Skip to content

Publish Documentation #122

Publish Documentation

Publish Documentation #122

Workflow file for this run

name: Publish Documentation
on:
workflow_dispatch:
push:
tags: ["v[0-9].[0-9]+.[0-9]+"]
# security: restrict permissions for CI jobs.
permissions:
contents: read
jobs:
# Build the documentation and upload the static HTML files as an artifact.
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up environment
run: uv sync --extra docs
- name: Run pdoc
run: uv run python -m pdoc --logo logo.svg --favicon favicon.ico -o docs/ pyftms
- uses: actions/upload-pages-artifact@v3
with:
path: docs/
# Deploy the artifact to GitHub pages.
# This is a separate job so that only actions/deploy-pages has the necessary permissions.
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4