-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (42 loc) · 1.65 KB
/
update-septic-docs-pr.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
46
47
48
49
50
51
name: "📚 Update SEPTIC docs"
on:
workflow_dispatch:
repository_dispatch:
types: [update-vscode-septic-docs]
jobs:
update_doc_pr:
name: "📚 Update PR"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install requirements
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt
- name: Update documentation
env:
API_TOKEN: ${{ secrets.SEPTIC_REPO_READ }}
run: python scripts/main.py ${{ github.event.client_payload.ref}}
- name: Look for documentation changes
id: checkfiles
run: |
# --quiet does apparently not imply --exit-code as git doc claims
echo "changed=$(git diff --exit-code public ':!**/meta.yaml' >/dev/null; echo $?)" >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
if: ${{ steps.checkfiles.outputs.changed != 0 }}
with:
add-paths: public/*
labels: "documentation"
branch: "septic-documentation-branch"
title: "docs: update SEPTIC documentation"
commit-message: "Autogenerated from SEPTIC repository"
delete-branch: true
body: |
## SEPTIC code documentation update :memo:
This PR was automatically generated due to one or more commits in the SEPTIC main branch that update the documentation for calcs or objects.
Merge this PR to update main branch with current SEPTIC documentation.