Delete feature branch deployment on branch delete #325
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Delete feature branch deployment on branch delete | |
on: | |
delete: | |
branches: | |
- '*' | |
- '!master' | |
- '!staging' | |
- '!gtif-demo' | |
- '!gtif_staging' | |
- '!polar' | |
jobs: | |
delete_folder: | |
runs-on: ubuntu-latest | |
steps: | |
# Set up AWS credentials | |
- name: Set up AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: eu-central-1 | |
# Delete the folder from the S3 bucket | |
- name: Delete folder from S3 | |
run: | | |
aws s3 rm s3://${{ secrets.AWS_S3_BUCKET }}/feature-branches/${{ github.event.ref }} --recursive |