-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (43 loc) · 1.22 KB
/
autodoc.yaml
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
on:
pull_request:
branches:
- main
name: Autodoc
jobs:
autodoc:
name: Update workflow documentation
runs-on: ubuntu-latest
steps:
-
name: Setup SSH agent
uses: webfactory/[email protected]
with:
ssh-private-key: "${{ secrets.SSH_KEY_AUTODOC }}"
-
name: Configure Python
uses: actions/[email protected]
with:
python-version: 3.11
-
name: Checkout
uses: actions/[email protected]
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
ssh-key: "${{ secrets.SSH_KEY_AUTODOC }}"
-
name: Update documentation
run: |
python -m pip install -U pyyaml
python .github/scripts/autodoc.py .github/workflows/workflow.yaml README.md
# Exit early if no changes were made
if [[ -z "$(git status --porcelain README.md)" ]]
then
echo "Nothing to do!"
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add README.md
git commit -m "docs: update readme with autodoc"
git push