-
Notifications
You must be signed in to change notification settings - Fork 73
43 lines (43 loc) · 1.68 KB
/
deploy-feature-branch.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
on:
pull_request:
branches:
- main
types:
- opened
- reopened
name: Initial Feature Branch Deploy
jobs:
deploy:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '18.x'
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: Deploy Feature Branch Infrastructure
run: |
npm ci
cd cdk-infra/
npm ci
npm run deploy:feature:stack -- -c isFeatureBranch=true -c env=stg -c customFeatureName=enhancedApp-stg-${{github.head_ref}} auto-builder-stack-enhancedApp-stg-${{github.head_ref}}-queues
npm run deploy:feature:stack -- -c isFeatureBranch=true -c env=stg -c customFeatureName=enhancedApp-stg-${{github.head_ref}} auto-builder-stack-enhancedApp-stg-${{github.head_ref}}-worker
npm run deploy:feature:stack -- -c isFeatureBranch=true -c env=stg -c customFeatureName=enhancedApp-stg-${{github.head_ref}} auto-builder-stack-enhancedApp-stg-${{github.head_ref}}-webhooks --outputs-file outputs.json
- name: Get Webhook URL
uses: mongodb/docs-worker-actions/comment-pr@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Cache root node_modules
id: cache-root
uses: actions/cache@v3
with:
path: |
node_modules
cdk-infra/node_modules
key: ${{ github.head_ref }}