Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.

Commit a3eec03

Browse files
authored
Add GitHub Actions to deploy enhanced app to staging (#877)
* Add actions to deploy enhanced autobuilder staging * Use branches instead of tags for staging * update actions to not overwrite prd * Add modules and Dockerfile.enhanced; also deploy to stg
1 parent c1794fe commit a3eec03

File tree

7 files changed

+98
-7
lines changed

7 files changed

+98
-7
lines changed

.github/workflows/deploy-prd-enhanced-webhooks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ jobs:
2525
run: |
2626
cd cdk-infra/
2727
npm ci
28-
npm run deploy:enhanced:webhooks -- -c env=prd
28+
npm run deploy:enhanced:webhooks -- -c env=prd -c customFeatureName=enhancedApp
2929

.github/workflows/deploy-prd-enhanced-worker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ jobs:
2525
run: |
2626
cd cdk-infra/
2727
npm ci
28-
npm run deploy:enhanced:worker -- -c env=prd
28+
npm run deploy:enhanced:worker -- -c env=prd -c customFeatureName=enhancedApp
2929

.github/workflows/deploy-prd-enhanced.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ jobs:
2222
npm ci
2323
cd cdk-infra/
2424
npm ci
25-
npm run deploy:enhanced -- -c env=prd
25+
npm run deploy:enhanced -- -c env=prd -c customFeatureName=enhancedApp
2626
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on:
2+
push:
3+
paths: ["api/v2/**", "cdk-infra/lib/constructs/api/**", "cdk-infra/utils/**"]
4+
branches:
5+
- "master"
6+
- "integration"
7+
8+
concurrency:
9+
group: environment-stg-enhanced-webhooks-${{ github.ref }}
10+
cancel-in-progress: true
11+
name: Deploy Staging ECS Enhanced Webhooks
12+
jobs:
13+
deploy-stg:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions/setup-node@v1
18+
with:
19+
node-version: '18.x'
20+
- name: Configure AWS credentials
21+
uses: aws-actions/configure-aws-credentials@v1
22+
with:
23+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
24+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
25+
aws-region: us-east-2
26+
- name: Deploy Enhanced Infrastructure
27+
run: |
28+
cd cdk-infra/
29+
npm ci
30+
npm run deploy:enhanced:webhooks -- -c env=dotcomstg -c customFeatureName=enhancedApp-dotcomstg
31+
npm run deploy:enhanced:webhooks -- -c env=stg -c customFeatureName=enhancedApp-stg
32+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on:
2+
push:
3+
paths: ["src/**", "cdk-infra/lib/constructs/worker/**", "Dockerfile.enhanced", "modules/**"]
4+
branches:
5+
- 'master'
6+
- 'integration'
7+
8+
concurrency:
9+
group: environment-stg-enhanced-worker-${{ github.ref }}
10+
cancel-in-progress: true
11+
name: Deploy Staging ECS Enhanced Worker
12+
jobs:
13+
deploy-stg:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions/setup-node@v1
18+
with:
19+
node-version: '18.x'
20+
- name: Configure AWS credentials
21+
uses: aws-actions/configure-aws-credentials@v1
22+
with:
23+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
24+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
25+
aws-region: us-east-2
26+
- name: Deploy Enhanced Infrastructure
27+
run: |
28+
cd cdk-infra/
29+
npm ci
30+
npm run deploy:enhanced:worker -- -c env=dotcomstg -c customFeatureName=enhancedApp-dotcomstg
31+
npm run deploy:enhanced:worker -- -c env=stg -c customFeatureName=enhancedApp-stg
32+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
on: [workflow_dispatch]
2+
concurrency:
3+
group: environment-stg-enhanced-${{ github.ref }}
4+
cancel-in-progress: true
5+
name: Deploy Staging ECS Enhanced
6+
jobs:
7+
deploy-stg:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-node@v1
12+
with:
13+
node-version: '18.x'
14+
- name: Configure AWS credentials
15+
uses: aws-actions/configure-aws-credentials@v1
16+
with:
17+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
18+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
19+
aws-region: us-east-2
20+
- name: Deploy Enhanced Infrastructure
21+
run: |
22+
npm ci
23+
cd cdk-infra/
24+
npm ci
25+
npm run deploy:enhanced -- -c env=dotcomstg -c customFeatureName=enhancedApp-dotcomstg
26+
npm run deploy:enhanced -- -c env=stg -c customFeatureName=enhancedApp-stg
27+

cdk-infra/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"watch": "tsc -w",
1010
"test": "jest",
1111
"cdk": "cdk",
12-
"deploy:enhanced": "cdk deploy -c enhanced=true -c customFeatureName=enhancedApp --require-approval never --all",
13-
"deploy:enhanced:worker": "cdk deploy auto-builder-stack-enhancedApp-worker -c enhanced=true -c customFeatureName=enhancedApp --require-approval never --exclusively",
14-
"deploy:enhanced:webhooks": "cdk deploy auto-builder-stack-enhancedApp-webhooks -c enhanced=true -c customFeatureName=enhancedApp --require-approval never --exclusively",
15-
"deploy:enhanced:queues": "cdk deploy auto-builder-stack-enhancedApp-queues -c enhanced=true -c customFeatureName=enhancedApp --require-approval never --exclusively",
12+
"deploy:enhanced": "cdk deploy -c enhanced=true --require-approval never --all",
13+
"deploy:enhanced:worker": "cdk deploy auto-builder-stack-enhancedApp-worker -c enhanced=true --require-approval never --exclusively",
14+
"deploy:enhanced:webhooks": "cdk deploy auto-builder-stack-enhancedApp-webhooks -c enhanced=true--require-approval never --exclusively",
15+
"deploy:enhanced:queues": "cdk deploy auto-builder-stack-enhancedApp-queues -c enhanced=true --require-approval never --exclusively",
1616
"deploy:feature": "cdk deploy -c enhanced=true --require-approval never --all",
1717
"deploy:feature:worker": "cdk deploy -c enhanced=true --require-approval never --exclusively",
1818
"deploy:feature:webhooks": "cdk deploy -c enhanced=true --require-approval never --exclusively"

0 commit comments

Comments
 (0)