Skip to content

Delete feature branch deployment on branch delete #336

Delete feature branch deployment on branch delete

Delete feature branch deployment on branch delete #336

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