5
5
branches :
6
6
- autogenerate-docs
7
7
8
+ permissions : { }
9
+
8
10
jobs :
9
11
generate-docs :
12
+ permissions :
13
+ pull-requests : write
10
14
runs-on : ubuntu-latest
11
15
12
16
steps :
@@ -26,26 +30,23 @@ jobs:
26
30
- name : Generate documentation
27
31
id : generate
28
32
run : |
29
- git diff
30
33
cd docs/build
31
34
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 }}
49
50
50
51
# - name: Create Pull Request
51
52
# uses: peter-evans/create-pull-request@v6
0 commit comments