-
Notifications
You must be signed in to change notification settings - Fork 14
38 lines (36 loc) · 1.14 KB
/
deploy.yml
File metadata and controls
38 lines (36 loc) · 1.14 KB
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
name: Lint Test Deploy
on:
push:
branches:
- main
- develop
jobs:
lint-test:
uses: ./.github/workflows/lint-test.yml
secrets: inherit
deploy:
needs: [lint-test]
runs-on: ubuntu-latest
concurrency: ${{ github.ref_name == 'main' && 'Production' || 'Staging' }}
environment: ${{ github.ref_name == 'main' && 'Production' || 'Staging' }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm ci
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@master
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}
aws-region: ${{ vars.AWS_REGION }}
- name: Bootstrap CDK
run: npm run cdk bootstrap
- name: CDK Deploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
APP_ENV: ${{ vars.APP_ENV }}
APP_DOMAIN_NAME: ${{ vars.APP_DOMAIN_NAME }}
run: npm run cdk deploy -- --require-approval never