-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (70 loc) · 2.14 KB
/
Copy pathdocs.yml
File metadata and controls
81 lines (70 loc) · 2.14 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Documentation
on:
push:
branches:
- main
paths:
- "README.md"
- "SECURITY.md"
- "docs/**"
- "mkdocs.yml"
- "pyproject.toml"
- "scripts/validate_docs.py"
- "tests/validate.sh"
- ".github/workflows/docs.yml"
pull_request:
paths:
- "README.md"
- "SECURITY.md"
- "docs/**"
- "mkdocs.yml"
- "pyproject.toml"
- "scripts/validate_docs.py"
- "tests/validate.sh"
- ".github/workflows/docs.yml"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build and validate documentation
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.13"
- name: Install documentation tools
run: python -m pip install ".[docs]"
- name: Validate repository links and examples
run: python scripts/validate_docs.py
- name: Build documentation with strict warnings
run: python -m mkdocs build --strict --site-dir site
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
with:
path: site
deploy:
name: Deploy documentation site
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' }}
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- name: Configure GitHub Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@f33f41b675f0ab2dc5a6863c9a170fe83af3571e # v4.0.0