generated from worldbank/template
-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (41 loc) · 1.44 KB
/
cd-dev.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
44
45
46
47
48
49
name: Deploy Space2Stats API Staging
on:
pull_request:
branches:
- main
permissions:
id-token: write
contents: read
jobs:
build:
environment: "Space2Stats API Dev"
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Install AWS CDK
run: npm install -g aws-cdk
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::017820688988:role/Space2Stats-Deploy-Role
aws-region: ${{ vars.CDK_DEFAULT_REGION }}
- name: Install CDK dependencies
working-directory: ./space2stats_api/cdk
run: |
pip install -r requirements-cdk.txt
- name: Deploy CDK stack to staging
working-directory: ./space2stats_api/cdk
env:
STAGE: dev
PGHOST: ${{ secrets.PGHOST }}
PGPORT: ${{ secrets.PGPORT }}
PGDATABASE: ${{ secrets.PGDATABASE }}
PGUSER: ${{ secrets.PGUSER }}
PGPASSWORD: ${{ secrets.PGPASSWORD }}
PGTABLENAME: ${{ secrets.PGTABLENAME }}
CDK_CERTIFICATE_ARN: ${{ vars.CDK_CERTIFICATE_ARN }}
CDK_DEFAULT_ACCOUNT: ${{ vars.CDK_DEFAULT_ACCOUNT }}
CDK_DEFAULT_REGION: ${{ vars.CDK_DEFAULT_REGION }}
CDK_DOMAIN_NAME: ${{ vars.CDK_DOMAIN_NAME }}
run: cdk deploy --require-approval never