-
-
Notifications
You must be signed in to change notification settings - Fork 15
52 lines (48 loc) · 1.79 KB
/
ephemeralDestroy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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 }}