Skip to content

Stack Destroy

Stack Destroy #15

Workflow file for this run

name: Stack Destroy
on:
workflow_dispatch:
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
destory:
name: Destroy
runs-on: ubuntu-latest
env:
AWS_REGION: ${{ secrets.AWS_REGION }}
steps:
- name: Git clone the repository
uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_CDK_ROLE_ARN }}
role-session-name: docs-site-template-destroy
aws-region: ${{ env.AWS_REGION }}
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: lts/*
- name: Installing dependencies
working-directory: cdk
run: npm install
- name: Destroying
working-directory: cdk
run: npm run destroy -- --force
- name: Clean dynamic variables
env:
GH_TOKEN: ${{ secrets.GH_SECRETS_TOKEN }}
run: |
gh variable delete AWS_BUCKET_NAME --env aws-development
gh variable delete AWS_DISTRIBUTION_ID --env aws-development
gh variable delete AWS_WEBSITE_URL --env aws-development