Skip to content

add action to deploy assets from PR and delete them when the PR is closed #1

add action to deploy assets from PR and delete them when the PR is closed

add action to deploy assets from PR and delete them when the PR is closed #1

Workflow file for this run

on:
pull_request:
types:
- closed
jobs:
delete_assets:
runs-on: ubuntu-latest
env:
destination: assets/website-2021-dev/pr-${{ github.event.number }}/
steps:
- name: Delete PR assets from the cdn-dev.w3.org bucket
if: success()
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1'
run:
aws s3 rm --recursive s3://cdn-dev.w3.org/${{ env.destination }}