-
Notifications
You must be signed in to change notification settings - Fork 7
52 lines (39 loc) · 1.16 KB
/
update_docs.yml
File metadata and controls
52 lines (39 loc) · 1.16 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
name: Update and Format Docs
on:
workflow_dispatch:
schedule:
- cron: '0 5 * * 1' # Runs every Monday at 05:00 UTC
jobs:
update-docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install package with dev extras
run: |
python -m pip install --upgrade pip
pip install .[dev]
- name: Run docs/generate_indices.py
run: python docs/generate_indices.py
- name: Configure git
run: |
git config --global user.name "github-actions"
git config --global user.email "actions@github.com"
- name: Run pre-commit hooks (ignore failures)
run: pre-commit run --all-files || true
- name: Add all changes
run: |
git add -A
- name: Commit changes
run: |
git commit -m "Auto-update documentation indices" || echo "No changes to commit"
- name: Push changes
run: git push