From 62b3ec863cfa46e7af1081ddac92562930c22baf Mon Sep 17 00:00:00 2001 From: Piotr Korkus Date: Mon, 2 Feb 2026 15:57:30 +0100 Subject: [PATCH] docs: release versioned documentation - deploy pages for the release tags - never cleanup release docs --- .github/actions/deploy-versioned-pages/action.yml | 2 ++ .github/workflows/docs-cleanup.yml | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/actions/deploy-versioned-pages/action.yml b/.github/actions/deploy-versioned-pages/action.yml index 867db4a..c741e26 100644 --- a/.github/actions/deploy-versioned-pages/action.yml +++ b/.github/actions/deploy-versioned-pages/action.yml @@ -47,6 +47,8 @@ runs: run: | if [[ "${{ github.event_name }}" == 'pull_request_target' || "${{ github.event_name }}" == 'pull_request' ]]; then target_folder="pr-${{ github.event.pull_request.number }}" + elif [[ "${{ github.event_name }}" == 'release' ]]; then + target_folder="${{ github.event.release.tag_name }}" else target_folder="${{github.ref_name}}" fi diff --git a/.github/workflows/docs-cleanup.yml b/.github/workflows/docs-cleanup.yml index c195d4a..f6d9a8c 100644 --- a/.github/workflows/docs-cleanup.yml +++ b/.github/workflows/docs-cleanup.yml @@ -67,7 +67,8 @@ jobs: ACTIVE_BRANCHES=$(gh api --paginate repos/${{ github.repository }}/branches --jq '.[].name') OPEN_PRS=$(gh api --paginate repos/${{ github.repository }}/pulls --jq '.[].number' | sed 's/^/pr-/') - VALID_ENTRIES=$(echo -e "$ACTIVE_BRANCHES\n$OPEN_PRS") + RELEASES=$(gh api --paginate repos/${{ github.repository }}/releases --jq '.[].name') + VALID_ENTRIES=$(echo -e "$ACTIVE_BRANCHES\n$OPEN_PRS\n$RELEASES") CURRENT_FOLDERS=$(find . -maxdepth 1 -type d -not -name '.' -not -path './.*' -exec basename {} \;) if [[ -f versions.json ]]; then