From 719519205ef85a076f6050cf9901c980f6bc790b Mon Sep 17 00:00:00 2001 From: bailey Date: Wed, 24 Sep 2025 11:16:43 -0600 Subject: [PATCH] fix docs --- .github/workflows/build_and_commit_docs.yml | 28 ++++++++++++++++++++ .github/workflows/build_docs.yml | 29 ++++++++++----------- 2 files changed, 42 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/build_and_commit_docs.yml diff --git a/.github/workflows/build_and_commit_docs.yml b/.github/workflows/build_and_commit_docs.yml new file mode 100644 index 00000000000..1fdbabe3276 --- /dev/null +++ b/.github/workflows/build_and_commit_docs.yml @@ -0,0 +1,28 @@ +on: + push: + branches: ['main'] + workflow_dispatch: {} + +name: Build and commit documentation + +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 + 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 diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index 7377eebb3fe..bd1804b9c26 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -1,31 +1,30 @@ -name: Build and commit docs +name: Build documentation on: push: branches: ['main'] + workflow_dispatch: {} + workflow_call: {} -permissions: - contents: write - pull-requests: write + pull_request: + branches: [ "main" ] jobs: build: - # prevent subsequent commits from triggering the job multiple times - concurrency: - group: ci-${{ github.ref }} - cancel-in-progress: true - runs-on: ubuntu-latest 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 - - run: sudo apt update && sudo apt-get install hugo + - name: Build Docs run: npm run build:docs -- --yes - - name: Open Pull Request - uses: peter-evans/create-pull-request@v6 - with: - title: 'docs: generate docs from latest main [skip-ci]' - delete-branch: true +