From efcd92412c103c9562c9dcbd7cbec4f09201210f Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Wed, 16 Sep 2026 09:45:34 +0200 Subject: [PATCH] Extract GitHub Pages deploy into standalone docs.yml workflow Pages now deploys on every main push independently of the container build. PRs get a docs build check using the same job. Removes the deploy job from prerelease.yml so it no longer blocks on containers. Co-Authored-By: Claude --- .github/workflows/docs.yml | 57 ++++++++++++++++++++++++++++++++ .github/workflows/prerelease.yml | 40 +--------------------- 2 files changed, 58 insertions(+), 39 deletions(-) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..9c2f9c45e3 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,57 @@ +name: Docs + +on: + push: + branches: + - main + pull_request: + types: + - opened + - synchronize + - reopened + +permissions: {} + +concurrency: + group: docs-${{ github.event_name == 'pull_request' && format('pr{0}', github.event.pull_request.number) || 'main' }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + build: + if: github.event.repository.fork == false + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@v7 + with: + persist-credentials: false + + - name: Build documentation + uses: elastic/docs-builder@main + with: + prefix: docs-builder + + - name: Upload pages artifact + if: github.event_name == 'push' + uses: actions/upload-pages-artifact@v5.0.0 + with: + path: .artifacts/docs/html + + deploy: + if: github.event_name == 'push' && github.event.repository.fork == false + needs: build + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + concurrency: + group: deploy-to-github-pages + cancel-in-progress: false + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v5.0.0 diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 6b96e9a74c..b4c41e5f09 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -8,44 +8,6 @@ on: permissions: {} jobs: - deploy: - runs-on: ubuntu-latest - permissions: - contents: read - pages: write - id-token: write - outputs: - full-version: ${{ steps.bootstrap.outputs.full-version }} - major-version: ${{ steps.bootstrap.outputs.major-version }} - needs: [build] - concurrency: - group: deploy-to-github-pages - - environment: - name: github-pages - url: ${{steps.deployment.outputs.page_url}} - steps: - - id: repo-basename - run: 'echo "value=`basename ${{ github.repository }}`" >> $GITHUB_OUTPUT' - - uses: actions/checkout@v7 - with: - persist-credentials: false - - name: Setup Pages - id: pages - uses: actions/configure-pages@v6.0.0 - - name: Build documentation - uses: elastic/docs-builder@main - with: - prefix: '${{ steps.repo-basename.outputs.value }}' - - name: Upload artifact - uses: actions/upload-pages-artifact@v5.0.0 - with: - path: .artifacts/docs/html - - - name: Deploy artifact - id: deployment - uses: actions/deploy-pages@v5.0.0 - build: runs-on: ubuntu-latest permissions: @@ -147,7 +109,7 @@ jobs: -F client_payload[sha]="$SHA" notify-failure: - needs: [build, deploy] + needs: [build] if: always() && contains(needs.*.result, 'failure') runs-on: ubuntu-slim permissions: