-
Notifications
You must be signed in to change notification settings - Fork 5
47 lines (39 loc) · 1.1 KB
/
Copy pathdocs.yml
File metadata and controls
47 lines (39 loc) · 1.1 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
name: Deploy Documentation
on:
push:
branches: [main]
paths:
- 'docs/**'
- 'mkdocs.yml'
- 'src/**'
- 'requirements-docs.txt'
- 'scripts/generate_changelog.py'
pull_request:
paths:
- 'docs/**'
- 'mkdocs.yml'
- 'src/**'
- 'requirements-docs.txt'
permissions:
contents: write
pages: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for changelog generation
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: pip install -r requirements-docs.txt
- name: Generate changelog
run: python scripts/generate_changelog.py > docs/changelog.md
- name: Build docs (PR check)
if: github.event_name == 'pull_request'
run: mkdocs build --strict
- name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: mkdocs gh-deploy --force