File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Check and Generate
33on :
44 pull_request :
55 push :
6- branches :
6+ branches-ignore :
77 - master
88 - release/*
99 workflow_dispatch :
7171 generate-docs :
7272 name : Generate Documentation
7373 runs-on : ubuntu-latest
74- if : github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref != 'refs/heads/master' && github.ref != 'refs/heads/releases' && !startsWith(github.ref, 'refs/heads/release/'))
74+ if : github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/heads/release/'))
7575 permissions :
7676 contents : write
7777 steps :
@@ -92,14 +92,17 @@ jobs:
9292 }
9393
9494 - name : Commit and push if documentation changed
95+ env :
96+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
9597 run : |
9698 if [ -n "$(git status --porcelain)" ]; then
97- # Bot email is configured from: https://github.com/orgs/community/discussions/26560
99+ # Bot email is configured from: https://github.com/orgs/community/discussions/26560
98100 git config user.name "github-actions[bot]"
99101 git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
100102 git add .
101103 git commit -m "docs: update API documentation via docsgen-cli"
102- git push
104+ BRANCH_NAME=$(echo $GITHUB_REF | sed 's/refs\/heads\///')
105+ git push origin HEAD:$BRANCH_NAME
103106 else
104107 echo "No documentation changes to commit"
105- fi
108+ fi
You can’t perform that action at this time.
0 commit comments