From f327c51cbb39aee70c7e7ac12a22a1095fe5e697 Mon Sep 17 00:00:00 2001 From: Caleb Godwin Date: Fri, 1 Nov 2024 12:47:15 -0400 Subject: [PATCH] Add deploy and remove-experimental actions (explicitly ignoring remove.yml) --- .github/workflows/deploy.yml | 13 +++++++++++++ .github/workflows/remove-experimental.yml | 12 ++++++++++++ 2 files changed, 25 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a10a1f5aa3..aae23676a3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -70,6 +70,19 @@ jobs: with: role-to-assume: ${{ secrets.AWS_OIDC_ROLE_TO_ASSUME }} aws-region: us-east-1 + - name: deploy hello world CDK stack + env: + STAGE: ${{ matrix.environment }} + AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} + AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} + run: | + pushd cdk-eregs + npm install -g aws-cdk + npm install + cdk synth -c stage=${STAGE} -c account=${AWS_ACCOUNT_ID} -c region=${AWS_DEFAULT_REGION} + cdk deploy -c stage=${STAGE} -c account=${AWS_ACCOUNT_ID} -c region=${AWS_DEFAULT_REGION} \ + ${STAGE}-HelloWorldStack --require-approval never + popd - name: deploy static assets run: | pushd solution/static-assets diff --git a/.github/workflows/remove-experimental.yml b/.github/workflows/remove-experimental.yml index b2852b77eb..f2cb108d6b 100644 --- a/.github/workflows/remove-experimental.yml +++ b/.github/workflows/remove-experimental.yml @@ -39,6 +39,18 @@ jobs: with: role-to-assume: ${{ secrets.AWS_OIDC_ROLE_TO_ASSUME }} aws-region: us-east-1 + - name: remove hello world cdk stack + env: + PR_NUMBER: ${{ github.event.number }} + AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} + AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} + run: | + pushd cdk-eregs + npm install -g aws-cdk + npm install + STAGE=dev${PR_NUMBER} cdk destroy -c stage=dev${PR_NUMBER} -c account=${AWS_ACCOUNT_ID} -c region=${AWS_DEFAULT_REGION} \ + dev${PR_NUMBER}-HelloWorldStack --require-approval never + popd # Remove parsers - name: remove parsers env: