Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/actions/build_documentation/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 'Build Documentation'
description: 'Build documentation files'
runs:
using: 'composite'
steps:
- name: Install Hugo
shell: bash
run: |
mkdir hugo
curl -L https://github.com/gohugoio/hugo/releases/download/v0.150.0/hugo_0.150.0_linux-amd64.tar.gz | tar -xzf - -C hugo
echo "$(pwd)/hugo" >> $GITHUB_PATH

- name: Install Node and dependencies
uses: mongodb-labs/drivers-github-tools/node/setup@v2

- name: Build Docs
run: npm run build:docs -- --yes
shell: bash
29 changes: 16 additions & 13 deletions .github/workflows/build_and_commit_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,27 @@ on:

name: Build and commit documentation

permissions:
contents: write
pull-requests: write

jobs:
build-docs:
# prevent subsequent commits from triggering the job multiple times
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
name: "Build documentation."
uses: ./.github/workflows/build.yml

commit-docs:
needs: [build-docs]
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
runs-on: 'ubuntu-latest'

steps:
- name: Open Pull Request
uses: peter-evans/create-pull-request@v6
with:
title: 'docs: generate docs from latest main [skip-ci]'
delete-branch: true
- uses: actions/checkout@v5

- name: "Build documentation"
uses: ./.github/actions/build_documentation

- name: Open Pull Request
uses: peter-evans/create-pull-request@v6
with:
title: 'docs: generate docs from latest main [skip-ci]'
delete-branch: true
14 changes: 1 addition & 13 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,4 @@ jobs:

steps:
- uses: actions/checkout@v5

- name: Install Hugo
run: |
mkdir hugo
curl -L https://github.com/gohugoio/hugo/releases/download/v0.150.0/hugo_0.150.0_linux-amd64.tar.gz | tar -xzf - -C hugo
echo "$(pwd)/hugo" >> $GITHUB_PATH

- name: Install Node and dependencies
uses: mongodb-labs/drivers-github-tools/node/setup@v2

- name: Build Docs
run: npm run build:docs -- --yes

- uses: ./.github/actions/build_documentation