Skip to content

Commit

Permalink
WIP permissions1
Browse files Browse the repository at this point in the history
  • Loading branch information
gwaramadze committed Jul 29, 2024
1 parent 380e2ae commit 2ea3e11
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ on:
branches:
- autogenerate-docs

permissions: { }

jobs:
generate-docs:
permissions:
pull-requests: write
runs-on: ubuntu-latest

steps:
Expand All @@ -26,26 +30,23 @@ jobs:
- name: Generate documentation
id: generate
run: |
git diff
cd docs/build
python build.py
git diff
# 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: |
# echo $GITHUB_OUTPUT
# 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 -u origin update-docs
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# 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 -u origin update-docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# - name: Create Pull Request
# uses: peter-evans/create-pull-request@v6
Expand Down

0 comments on commit 2ea3e11

Please sign in to comment.