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
2
2
3
3
on :
4
4
push :
5
5
branches : ['main']
6
+ workflow_dispatch : {}
7
+ workflow_call : {}
6
8
7
- permissions :
8
- contents : write
9
- pull-requests : write
9
+ pull_request :
10
+ branches : [ "main" ]
10
11
11
12
jobs :
12
13
build :
13
- # prevent subsequent commits from triggering the job multiple times
14
- concurrency :
15
- group : ci-${{ github.ref }}
16
- cancel-in-progress : true
17
-
18
14
runs-on : ubuntu-latest
19
15
20
16
steps :
21
17
- 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
+
22
25
- name : Install Node and dependencies
23
26
uses : mongodb-labs/drivers-github-tools/node/setup@v2
24
- - run : sudo apt update && sudo apt-get install hugo
27
+
25
28
- name : Build Docs
26
29
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