From 4889c27fbc1f1a0cd63b7de43870efe246916478 Mon Sep 17 00:00:00 2001 From: bailey Date: Thu, 25 Sep 2025 13:44:15 -0600 Subject: [PATCH 1/2] fix documentation --- .github/workflows/build_and_commit_docs.yml | 29 ++++++++++++--------- .github/workflows/build_docs.yml | 14 +--------- 2 files changed, 17 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build_and_commit_docs.yml b/.github/workflows/build_and_commit_docs.yml index e4db200abb6..46317f7db73 100644 --- a/.github/workflows/build_and_commit_docs.yml +++ b/.github/workflows/build_and_commit_docs.yml @@ -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 \ No newline at end of file + - 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 diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index bd1804b9c26..dd7b265c937 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -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 From 81b7d91a2d88ce3d901fd63f589382a162090f50 Mon Sep 17 00:00:00 2001 From: bailey Date: Thu, 25 Sep 2025 13:46:26 -0600 Subject: [PATCH 2/2] add composite action --- .github/actions/build_documentation/action.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/actions/build_documentation/action.yml diff --git a/.github/actions/build_documentation/action.yml b/.github/actions/build_documentation/action.yml new file mode 100644 index 00000000000..17ea642294d --- /dev/null +++ b/.github/actions/build_documentation/action.yml @@ -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