From 4287e308bed85c94c08d8e57e7b5ea97af474077 Mon Sep 17 00:00:00 2001 From: Olivier Cots Date: Thu, 15 Oct 2026 16:42:44 +0200 Subject: [PATCH] ci(docs): remove the previews of closed PRs from gh-pages DocPreviewCleanup.yml calls CTActions documentation-preview-cleanup.yml when a PR is closed, or by hand (control-toolbox/CTActions#94). Co-Authored-By: Claude Opus 5.5 --- .github/workflows/DocPreviewCleanup.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/DocPreviewCleanup.yml diff --git a/.github/workflows/DocPreviewCleanup.yml b/.github/workflows/DocPreviewCleanup.yml new file mode 100644 index 00000000..45fa3857 --- /dev/null +++ b/.github/workflows/DocPreviewCleanup.yml @@ -0,0 +1,20 @@ +name: Documentation preview cleanup + +# Removes from gh-pages the documentation previews of closed pull requests +# (CTActions documentation-preview-cleanup.yml, see its docs/WORKFLOWS.md ยง3.1). + +on: + pull_request: + types: [closed] + workflow_dispatch: + +jobs: + call: + # A PR from a fork gets a read-only token, and its build never deployed a preview. + if: > + github.event_name == 'workflow_dispatch' || + github.event.pull_request.head.repo.full_name == github.repository + permissions: + contents: write + pull-requests: read + uses: control-toolbox/CTActions/.github/workflows/documentation-preview-cleanup.yml@main