This repository was archived by the owner on Sep 2, 2025. It is now read-only.
Bump actions/checkout from 3 to 5 #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Preview documentation build | |
on: # yamllint disable-line rule:truthy | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
env: | |
CLICOLOR: 1 | |
concurrency: preview-${{ github.ref }} | |
permissions: {} | |
jobs: | |
run: | |
# Grant GITHUB_TOKEN the permissions required to make a gh-pages deployment | |
permissions: | |
contents: write # to let mkdocs write the new docs | |
pages: write # to deploy to Pages | |
id-token: write # allow to generate an OpenID Connect (OIDC) token | |
pull-requests: write # add comment on the PR with the preview URL | |
runs-on: ubuntu-latest | |
steps: | |
# https://github.com/actions/checkout | |
- name: Checkout | |
uses: actions/checkout@v5 | |
with: | |
fetch-depth: 0 | |
# https://github.com/astral-sh/setup-uv | |
- name: Install uv | |
uses: astral-sh/setup-uv@v6.4.3 | |
with: | |
python-version: 3.13 | |
enable-cache: true | |
cache-dependency-glob: "uv.lock" | |
# https://github.com/actions/setup-python | |
- name: Set up Python 3 | |
uses: actions/setup-python@v5.6.0 | |
with: | |
python-version: 3.13 | |
- name: Install dependencies | |
run: uv sync --dev --no-progress | |
- name: Build documentation | |
run: | | |
uv run mkdocs build -d site | |
touch site/.nojekyll | |
# https://github.com/rossjrw/pr-preview-action | |
- name: Deploy preview | |
uses: rossjrw/pr-preview-action@v1.6.2 | |
with: | |
source-dir: site/ | |
preview-branch: gh-pages |