File tree Expand file tree Collapse file tree 2 files changed +42
-15
lines changed Expand file tree Collapse file tree 2 files changed +42
-15
lines changed Original file line number Diff line number Diff line change 1+ on :
2+ push :
3+ branches : ['main']
4+ workflow_dispatch : {}
5+
6+ name : Build and commit documentation
7+
8+ jobs :
9+ build-docs :
10+ # prevent subsequent commits from triggering the job multiple times
11+ concurrency :
12+ group : ci-${{ github.ref }}
13+ cancel-in-progress : true
14+ name : " Build documentation."
15+ uses : ./.github/workflows/build.yml
16+
17+ commit-docs :
18+ needs : [build-docs]
19+ permissions :
20+ contents : write
21+ pull-requests : write
22+ runs-on : ubuntu-latest
23+ steps :
24+ - name : Open Pull Request
25+ uses : peter-evans/create-pull-request@v6
26+ with :
27+ title : ' docs: generate docs from latest main [skip-ci]'
28+ delete-branch : true
Original file line number Diff line number Diff line change 1- name : Build and commit docs
1+ name : Build documentation
22
33on :
44 push :
55 branches : ['main']
6+ workflow_dispatch : {}
7+ workflow_call : {}
68
7- permissions :
8- contents : write
9- pull-requests : write
9+ pull_request :
10+ branches : [ "main" ]
1011
1112jobs :
1213 build :
13- # prevent subsequent commits from triggering the job multiple times
14- concurrency :
15- group : ci-${{ github.ref }}
16- cancel-in-progress : true
17-
1814 runs-on : ubuntu-latest
1915
2016 steps :
2117 - uses : actions/checkout@v5
18+
19+ - name : Install Hugo
20+ run : |
21+ mkdir hugo
22+ curl -L https://github.com/gohugoio/hugo/releases/download/v0.150.0/hugo_0.150.0_linux-amd64.tar.gz | tar -xzf - -C hugo
23+ echo "$(pwd)/hugo" >> $GITHUB_PATH
24+
2225 - name : Install Node and dependencies
2326 uses : mongodb-labs/drivers-github-tools/node/setup@v2
24- - run : sudo apt update && sudo apt-get install hugo
27+
2528 - name : Build Docs
2629 run : npm run build:docs -- --yes
27- - name : Open Pull Request
28- uses : peter-evans/create-pull-request@v6
29- with :
30- title : ' docs: generate docs from latest main [skip-ci]'
31- delete-branch : true
30+
You can’t perform that action at this time.
0 commit comments