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
82 changes: 82 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: docs

on:
push:
branches:
- main
paths:
- ".github/workflows/docs.yml"
- "docs/**"
- "dmf/**"
- "mkdocs.yml"
- "pyproject.toml"
- "poetry.lock"
- "Makefile"
pull_request:
paths:
- ".github/workflows/docs.yml"
- "docs/**"
- "dmf/**"
- "mkdocs.yml"
- "pyproject.toml"
- "poetry.lock"
- "Makefile"
workflow_dispatch:

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
name: Build MkDocs site
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Install Poetry
run: pipx install poetry

- name: Configure Poetry
run: poetry config virtualenvs.in-project true

- name: Install documentation dependencies
run: poetry install --with docs --no-interaction

- name: Build documentation
run: poetry run mkdocs build --site-dir site

- name: Configure GitHub Pages
uses: actions/configure-pages@v5

- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v4
with:
path: site

deploy:
name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Loading