Destroy Ephemeral Environment #669
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: Destroy Ephemeral Environment | |
on: | |
delete: | |
branches-ignore: | |
- main | |
- alpha | |
- beta | |
env: | |
LEFTHOOK: 0 | |
concurrency: | |
group: ${{ github.event.ref }} | |
cancel-in-progress: true | |
jobs: | |
destroy: | |
environment: Ephemeral | |
name: 🚨 Destroying ${{ github.event.ref }} from an ephemeral environment 🚨 | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up node | |
uses: meza/action-setup-node-npm@main | |
with: | |
command: install | |
node-version: latest | |
cache-name: destroy-${{ github.event.ref }} | |
- name: 🔨 Build | |
run: npm run build | |
env: | |
AUTH0_DOMAIN: ${{ secrets.AUTH0_DOMAIN }} | |
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID }} | |
AUTH0_CLIENT_SECRET: ${{ secrets.AUTH0_CLIENT_SECRET }} | |
GOOGLE_ANALYTICS_ID: ${{ vars.GOOGLE_ANALYTICS_ID }} | |
NODE_ENV: production | |
SPLIT_SERVER_TOKEN: ${{ secrets.SPLIT_SERVER_TOKEN }} | |
SESSION_SECRET: ${{ secrets.SESSION_SECRET }} | |
HOTJAR_ID: ${{ vars.HOTJAR_ID }} | |
POSTHOG_TOKEN: ${{ vars.POSTHOG_TOKEN }} | |
POSTHOG_API: ${{ vars.POSTHOG_API }} | |
COOKIEYES_TOKEN: ${{ vars.COOKIEYES_TOKEN }} | |
SENTRY_DSN: ${{ vars.SENTRY_DSN }} | |
I18N_DEBUG: 'true' | |
SPLIT_DEBUG: 'true' | |
- name: 📦 Destroy ${{ github.event.ref }} | |
run: npx cdk destroy remix-trance-stack-ephemeral --force --require-approval never --context environmentName=${{ github.event.ref }} --context domainName=${{ vars.AWS_DOMAIN_NAME }} --context certificateArn=${{ secrets.AWS_CERT_ARN }} --context hostedZoneName=${{ vars.AWS_HOSTED_ZONE_NAME }} | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |