WIP push with GITHUB_TOKEN #6
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 | |
jobs: | |
generate-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
- name: Install dependencies | |
run: | | |
cd docs/build | |
pip install -r requirements.txt | |
- name: Generate documentation | |
run: | | |
cd docs/build | |
python build.py | |
- name: Configure Git | |
run: | | |
git config --global user.name 'github-actions' | |
git config --global user.email '[email protected]' | |
- name: Commit and push changes | |
run: | | |
git checkout -b update-docs | |
git add docs/api-reference | |
git commit -m "Update documentation" | |
git push -u origin update-docs | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# - 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' |