File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed
Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change 1- name : Build and Copy Docusaurus to /docs
1+ name : Build and update documentation site
22
33on :
44 push :
5+ paths :
6+ - ' docusaurus/**'
57 branches :
6- - main # Only run on push to main branch
8+ - main
79
810jobs :
911 build-docusaurus :
12+ if : " !startsWith(github.ref, 'refs/heads/update-docs-site-')"
1013 runs-on : ubuntu-latest
1114 defaults :
1215 run :
@@ -36,10 +39,24 @@ jobs:
3639 - name : Copy built site to docs/
3740 run : cp -r build/* ../docs/
3841
39- - name : Commit and push changes to docs/
42+ - name : Commit changes to a new branch
4043 run : |
4144 git config user.name "github-actions[bot]"
4245 git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
46+
47+ BRANCH_NAME="update-docs-site-$(date +%s)"
48+ git checkout -b $BRANCH_NAME
4349 git add ../docs
4450 git commit -m "Update Docusaurus site [skip ci]" || echo "No changes to commit"
45- git push
51+ git push origin $BRANCH_NAME
52+
53+ - name : Create pull request
54+ uses : peter-evans/create-pull-request@v5
55+ with :
56+ token : ${{ secrets.GITHUB_TOKEN }}
57+ commit-message : Update Docusaurus site [skip ci]
58+ branch : ${{ github.ref_name }}
59+ title : ' Update Docusaurus site'
60+ body : ' This PR updates the static documentation site.'
61+ base : main
62+
You can’t perform that action at this time.
0 commit comments