Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Documentation

# build the documentation whenever there are new commits on main
on:
push:
branches:
- main
# Alternative: only build for tags.
# tags:
# - '*'

# 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:
# setup
- uses: actions/checkout@v5
with:
persist-credentials: false

- uses: actions/setup-python@v5
with:
python-version: '3.13'

- uses: astral-sh/setup-uv@v6
with:
enable-cache: true

- name: Install chordnet dependencies
run: uv sync --frozen --all-extras --dev

- name: Build docs
run: pdoc -o docs/

- uses: actions/upload-pages-artifact@v4
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
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ explicit = true
dev = [
"bpython>=0.25",
"mypy>=1.17.1",
"pdoc>=15.0.4",
"pre-commit>=4.3.0",
"pytest>=8.4.1",
"ruff>=0.12.5",
Expand Down
Loading