Skip to content

Commit 1630d2f

Browse files
akira28claude
andauthored
Stop preview cleanup from deleting other PRs' previews (#4626)
`aws s3 rm` matches by key prefix, so the cleanup for PR 461 also removed the previews for PRs 4610 to 4619. A trailing slash limits the delete to the closed PR's own folder. Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 9817cdb commit 1630d2f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎.github/workflows/preview-cleanup.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,5 @@ jobs:
6666
PR_NUMBER: ${{ github.event.pull_request.number }}
6767
S3_FOLDER: ${{ inputs.s3-folder }}
6868
run: |
69-
aws s3 rm "s3://elastic-docs-v3-website-preview/${GITHUB_REPOSITORY}/${S3_FOLDER}/${PR_NUMBER}" --recursive
69+
# The trailing slash matters: `s3 rm` matches by key prefix, so without it PR 461 also deletes 4610-4619.
70+
aws s3 rm "s3://elastic-docs-v3-website-preview/${GITHUB_REPOSITORY}/${S3_FOLDER}/${PR_NUMBER}/" --recursive

0 commit comments

Comments
 (0)