WIP PR #23
Workflow file for this run
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: Generate Documentation | |
on: | |
push: | |
branches: | |
- autogenerate-docs | |
permissions: { } | |
jobs: | |
generate-docs: | |
permissions: | |
contents: write | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- run: pip install -r docs/build/requirements.txt | |
- name: Generate documentation | |
# id: generate | |
run: | | |
cd docs/build | |
python build.py | |
# git diff --quiet && DIFF=false || DIFF=true | |
# echo $DIFF | |
# echo "diff=$DIFF" >> $GITHUB_OUTPUT | |
- name: Commit and push changes | |
# if: steps.generate.outputs.diff == 'true' | |
run: | | |
git checkout -b update-docs | |
git add docs/api-reference | |
git config --global user.name 'github-actions' | |
git config --global user.email '[email protected]' | |
git commit -m "Update documentation" | |
git push -f -u origin update-docs | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: update-docs | |
title: 'Update Documentation' | |
body: 'This PR updates the documentation with the latest changes.' | |
labels: 'documentation' |