-
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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # 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