-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (46 loc) · 1.46 KB
/
update-docs.yml
File metadata and controls
57 lines (46 loc) · 1.46 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
name: Update Documentation
on:
schedule:
- cron: "0 18 * * *"
workflow_dispatch:
jobs:
update-docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
- name: Install dependencies
run: |
pip install -r docs/script/requirements.txt
- name: Run documentation crawler
run: |
cd docs/script
python crawler.py
- name: Check for changes
id: check_changes
run: |
git add docs/
if git diff --cached --quiet; then
echo "has_changes=false" >> $GITHUB_OUTPUT
else
echo "has_changes=true" >> $GITHUB_OUTPUT
fi
- name: Commit and push changes
if: steps.check_changes.outputs.has_changes == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "docs: Update Claude Agent SDK documentation
Co-Authored-By: GitHub Actions <github-actions[bot]@users.noreply.github.com>"
git push
- name: No changes detected
if: steps.check_changes.outputs.has_changes != 'true'
run: |
echo "No changes detected in documentation."