update-vscode-septic-docs #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |