Skip to content

[pre-commit.ci] pre-commit autoupdate #43

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #43

Workflow file for this run

name: docs
permissions:
contents: write
pull-requests: write
on:
push:
branches:
- main
paths:
- .pre-commit-config.yaml
- .github/workflows/docs.yml
- '**.py'
- '**.ipynb'
- '**.html'
- '**.js'
- '**.md'
- uv.lock
- pyproject.toml
- mkdocs.yml
- '**.png'
- '**.svg'
pull_request:
branches:
- main
paths:
- .pre-commit-config.yaml
- .github/workflows/docs.yml
- '**.py'
- '**.ipynb'
- '**.js'
- '**.html'
- uv.lock
- pyproject.toml
- '**.md'
- mkdocs.yml
- '**.png'
- '**.svg'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- name: Install uv
uses: astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182
with:
version: "0.5.21"
enable-cache: true
- name: Set up Python
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55
with:
python-version-file: ".python-version"
- name: Install the project
run: uv sync --all-extras --all-groups
- name: Build docs
run: uv run mkdocs build
- name: Create .nojekyll file
run: touch site/.nojekyll
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: docs-site
path: site/
retention-days: 1
deploy:
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Download artifact
uses: actions/download-artifact@v5
with:
name: docs-site
path: site
- name: Ensure .nojekyll exists
run: touch site/.nojekyll
- name: Deploy to Github pages
uses: JamesIves/github-pages-deploy-action@6c2d9db40f9296374acc17b90404b6e8864128c8
with:
branch: github_pages
folder: site