Skip to content
Merged
Changes from all 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
46 changes: 36 additions & 10 deletions .github/workflows/harp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
release:
types: [published]
workflow_dispatch:
inputs:
publish-docs-website:
description: "Publish docs website to GitHub Pages?"
default: "false"

jobs:
# ---- Tests ----
Expand Down Expand Up @@ -115,12 +119,10 @@ jobs:
with:
files: dist/*

# ---- Docs ----
# ---- Build docs ----
build-docs:
name: Build and deploy documentation to GitHub Pages
name: Build documentation
runs-on: ubuntu-latest
needs: build-release
if: github.event_name == 'release' && !github.event.release.prerelease
steps:
- name: Checkout
uses: actions/checkout@v7
Expand All @@ -135,10 +137,34 @@ jobs:
- name: Install dependencies
run: uv sync --group docs

- name: Configure Git user
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Build documentation
run: uv run mkdocs build

- name: Collect documentation website artifact
uses: actions/upload-pages-artifact@v5
with:
path: site/

- name: Build & Deploy docs
run: uv run mkdocs gh-deploy --force
# ---- Publish docs ----
publish-docs:
name: Publish documentation to GitHub Pages
runs-on: ubuntu-latest
needs: [build-docs, publish-to-pypi]
permissions:
# Both required by actions/deploy-pages.
pages: write
id-token: write
environment:
name: documentation-website
url: ${{ steps.publish.outputs.page_url }}
if: |
!cancelled() && !failure() && needs.build-docs.result == 'success'
&& (
(github.event_name == 'release' && !github.event.release.prerelease)
|| (github.event_name == 'workflow_dispatch' && github.event.inputs.publish-docs-website == 'true')
|| (github.event_name == 'push' && vars.CONTINUOUS_DOCUMENTATION)
)
steps:
- name: Publish to GitHub Pages
id: publish
uses: actions/deploy-pages@v5