delete_development #1
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_development | |
on: | |
workflow_dispatch: | |
env: | |
COMPONENT_NAME: 'ilw-video' # set this to the web component name you are using | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ vars.TOOLKIT_AWS_ACCESS_KEY }} | |
aws-secret-access-key: ${{ secrets.TOOLKIT_AWS_ACCESS_SECRET }} | |
aws-region: us-east-2 | |
- name: Delete S3 bucket | |
run: aws s3 rm s3://dev.toolkit.illinois.edu/content/$COMPONENT_NAME --recursive | |
- name: Invalidate Cloudfront cache | |
run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT_DEV }} --paths "/$COMPONENT_NAME*" |