From ca00a099610805f10337510d4d7e22c7012bb086 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Sat, 27 Dec 2025 02:15:28 +0300 Subject: [PATCH] fix: Clean up docs preview folders when PRs are closed Add the 'closed' event type to the docs-preview workflow trigger. The pr-preview-action with 'action: auto' will now detect closed PRs and remove the corresponding preview folder from gh-pages. --- .github/workflows/docs-preview.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs-preview.yml b/.github/workflows/docs-preview.yml index d5bbfa65..05833646 100644 --- a/.github/workflows/docs-preview.yml +++ b/.github/workflows/docs-preview.yml @@ -2,6 +2,7 @@ name: Docs Preview on: pull_request: + types: [opened, synchronize, reopened, closed] paths: - 'docs/**' - '.github/workflows/docs-preview.yml' @@ -33,7 +34,7 @@ jobs: run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - + # Try to fetch the gh-pages branch if git fetch origin gh-pages:gh-pages 2>/dev/null; then # Branch exists remotely, check if .nojekyll is present