Skip to content

Commit 2ea3e11

Browse files
committed
WIP permissions1
1 parent 380e2ae commit 2ea3e11

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

.github/workflows/docs.yml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ on:
55
branches:
66
- autogenerate-docs
77

8+
permissions: { }
9+
810
jobs:
911
generate-docs:
12+
permissions:
13+
pull-requests: write
1014
runs-on: ubuntu-latest
1115

1216
steps:
@@ -26,26 +30,23 @@ jobs:
2630
- name: Generate documentation
2731
id: generate
2832
run: |
29-
git diff
3033
cd docs/build
3134
python build.py
32-
git diff
33-
# git diff --quiet && DIFF=false || DIFF=true
34-
# echo $DIFF
35-
# echo "diff=$DIFF" >> $GITHUB_OUTPUT
36-
37-
# - name: Commit and push changes
38-
# if: steps.generate.outputs.diff == 'true'
39-
# run: |
40-
# echo $GITHUB_OUTPUT
41-
# git checkout -b update-docs
42-
# git add docs/api-reference
43-
# git config --global user.name 'github-actions'
44-
# git config --global user.email 'github-actions@github.com'
45-
# git commit -m "Update documentation"
46-
# git push -u origin update-docs
47-
# env:
48-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
# git diff --quiet && DIFF=false || DIFF=true
36+
# echo $DIFF
37+
# echo "diff=$DIFF" >> $GITHUB_OUTPUT
38+
39+
- name: Commit and push changes
40+
# if: steps.generate.outputs.diff == 'true'
41+
run: |
42+
git checkout -b update-docs
43+
git add docs/api-reference
44+
git config --global user.name 'github-actions'
45+
git config --global user.email 'github-actions@github.com'
46+
git commit -m "Update documentation"
47+
git push -u origin update-docs
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4950

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

0 commit comments

Comments
 (0)