Skip to content

Deploy MkDocs to GitHub Pages #50

Deploy MkDocs to GitHub Pages

Deploy MkDocs to GitHub Pages #50

Workflow file for this run

name: Deploy MkDocs to GitHub Pages
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
types: [opened, synchronize, reopened, edited]
workflow_dispatch:
jobs:
build_and_deploy:
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install the project
env:
UV_INDEX_URL: https://pypi.org/simple
UV_EXTRA_INDEX_URL: ""
run: uv sync --all-extras --dev
- name: Build site with MkDocs
run: uv run mkdocs build
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: site
- name: Deploy (only on push to master)
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
id: deploy
uses: actions/deploy-pages@v4