-
Notifications
You must be signed in to change notification settings - Fork 109
42 lines (42 loc) · 1.33 KB
/
docs.yml
File metadata and controls
42 lines (42 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Build and deploy documentation
on:
push:
branches:
- main
paths:
- "docs/**"
- ".github/workflows/docs.yml"
- ".mkdocs.yaml"
pull_request:
paths:
- "docs/**"
- ".github/workflows/docs.yml"
- ".mkdocs.yaml"
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
permissions:
contents: write
jobs:
build_documentation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.14"
cache: "pip"
cache-dependency-path: docs/requirements.txt
- name: Install mkdocs
run: pip install -r docs/requirements.txt
- name: Build documentation
if: ${{ github.event_name == 'pull_request' }}
run: mkdocs build --strict -f .mkdocs.yaml
- name: Configure git
if: ${{ github.event_name != 'pull_request' }}
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Publish documentation
if: ${{ github.event_name != 'pull_request' }}
run: mkdocs gh-deploy --strict --force -f .mkdocs.yaml