-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
45 lines (39 loc) · 1.11 KB
/
idlelib-help-regen.yml
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
name: Generate Lib/idlelib/help.html
on:
push:
paths:
- "Doc/library/idle.rst"
jobs:
generate-help-html:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Git setup
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Build and copy
run: |
cd Doc
make venv
make html
cd ..
python -c "from Lib.idlelib.help import copy_strip; copy_strip()"
- name: Commit and push if changed
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if ! git diff --quiet Lib/idlelib/help.html; then
git add Lib/idlelib/help.html
git commit -m "Auto-update help.html from idle.rst"
git push
else
echo "No changes to commit."