Skip to content

cdk settings fix

cdk settings fix #249

name: Deploy staging
on:
push:
branches:
- develop
- v3
env:
ENV: "staging"
PROJECT: "openaq"
DATABASE_READ_USER: ${{ secrets.DATABASE_READ_USER }}
DATABASE_READ_PASSWORD: ${{ secrets.DATABASE_READ_PASSWORD }}
DATABASE_WRITE_USER: ${{ secrets.DATABASE_WRITE_USER }}
DATABASE_WRITE_PASSWORD: ${{ secrets.DATABASE_WRITE_PASSWORD }}
DATABASE_DB: ${{ secrets.DATABASE_DB }}
DATABASE_HOST: ${{ secrets.DATABASE_HOST_STAGING }}
DATABASE_PORT: ${{ secrets.STAGING_DATABASE_PORT }}
API_LAMBDA_MEMORY_SIZE: ${{ secrets.API_LAMBDA_MEMORY_SIZE_STAGING }}
FETCH_ASCENDING: ${{ secrets.FETCH_ASCENDING }}
PIPELINE_LIMIT: ${{ secrets.PIPELINE_LIMIT }}
METADATA_LIMIT: ${{ secrets.METADATA_LIMIT }}
REALTIME_LIMIT: ${{ secrets.REALTIME_LIMIT }}
FETCH_BUCKET: ${{ secrets.FETCH_BUCKET }}
ETL_BUCKET: ${{ secrets.ETL_BUCKET }}
HOSTED_ZONE_ID: ${{ secrets.HOSTED_ZONE_ID }}
HOSTED_ZONE_NAME: ${{ secrets.HOSTED_ZONE_NAME }}
DOMAIN_NAME: "staging.openaq.org"
WEB_ACL_ID: ${{ secrets.WEB_ACL_ID }}
CERTIFICATE_ARN: ${{ secrets.CERTIFICATE_ARN }}
FASTAPI_URL: ""
CDK_ACCOUNT: ${{ secrets.CDK_ACCOUNT }}
CDK_REGION: ${{ secrets.CDK_REGION }}
VPC_ID: ${{ secrets.VPC_ID }}
RATE_LIMITING: True
RATE_AMOUNT: 10
RATE_AMOUNT_KEY: 10
RATE_TIME: 1
EMAIL_SENDER: ${{ secrets.EMAIL_SENDER }}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@master
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_STAGING }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY_STAGING }}
aws-region: ${{ secrets.AWS_REGION }}
- uses: actions/setup-node@v2
with:
node-version: "18"
- name: build pages
working-directory: ./pages
run: |
yarn install
yarn run deploy
- name: Install CDK
run: |
npm install -g [email protected]
- uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Deploy stack
working-directory: ./cdk
run: |
pip install -r requirements.txt
cdk deploy openaq-api-staging --require-approval never
# only deploy api until ingest and rollup are separated