diff --git a/.github/actions/doc_preview/action.yml b/.github/actions/doc_preview/action.yml index 0c60b899fbf..6e04abd3f1f 100644 --- a/.github/actions/doc_preview/action.yml +++ b/.github/actions/doc_preview/action.yml @@ -29,6 +29,11 @@ runs: folder: ${{ inputs.source-folder }} target-folder: docs/pr-preview/pr-${{ inputs.pr-number }}/ commit-message: "Deploy doc preview for PR ${{ inputs.pr-number }} (${{ github.sha }})" + # Every PR preview, the main docs deploy, and the coverage deploy commit to + # the shared gh-pages branch. Rebase onto a deployment that landed in the + # meantime instead of force-pushing over it, which the branch ruleset + # rejects (and which used to discard the other deployment). + force: false - name: Leave a comment after deployment if: ${{ github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }} @@ -56,6 +61,7 @@ runs: folder: ${{ inputs.source-folder }} target-folder: docs/pr-preview/pr-${{ inputs.pr-number }}/ commit-message: "Clean up doc preview for PR ${{ inputs.pr-number }} (${{ github.sha }})" + force: false - name: Leave a comment after removal if: ${{ github.ref_name == 'main' || startsWith(github.ref_name, 'release/') }} diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index bef2a7e84c0..8dcb9608186 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -357,3 +357,6 @@ jobs: target-folder: docs/ commit-message: "Deploy ${{ (inputs.is-release && 'release') || 'latest' }} docs: ${{ env.CUDA_PYTHON_DOCS_GITHUB_REF }}" clean: false + # Rebase onto concurrent PR-preview or coverage deployments instead of + # force-pushing, which the gh-pages ruleset rejects. + force: false diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 6015db55c9d..b336e622940 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -575,3 +575,6 @@ jobs: target-folder: docs/ commit-message: "Deploy combined coverage (Linux + Windows): ${{ github.sha }}" clean: false + # Rebase onto concurrent docs deployments instead of force-pushing, + # which the gh-pages ruleset rejects. + force: false