Skip to content

Commit

Permalink
fix: fixed deletion script in staging deployment workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
syam babu committed Oct 18, 2024
1 parent 2698e2b commit e15e58d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/build-staging-deploy-s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,4 @@ jobs:
if [ "$previous_major_version" -ge 0 ]; then
aws s3 rm s3://${{env.WEBHOSTING_BUCKET_NAME}}/v${previous_major_version}/ --recursive || true
fi
# Delete everything else in the bucket except the current and previous major version folders
aws s3 ls s3://${{env.WEBHOSTING_BUCKET_NAME}}/ | grep -vE "v${major_version}/|v${previous_major_version}/" | awk '{print $2}' | xargs -I {} aws s3 rm s3://${{env.WEBHOSTING_BUCKET_NAME}}/{}
fi

0 comments on commit e15e58d

Please sign in to comment.