Merge pull request #233 from kilowatts-io/preview #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy CDK App | |
on: | |
push: | |
branches: | |
- production | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '21.1.0' # Set this to your Node.js version | |
cache: 'yarn' | |
- name: Install Dependencies | |
run: yarn install | |
working-directory: backend | |
- name: Install AWS CDK | |
run: yarn global add aws-cdk | |
working-directory: backend | |
- 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: ${{ secrets.AWS_DEFAULT_REGION }} | |
- name: Deploy CDK App | |
run: cdk deploy --require-approval never | |
working-directory: backend | |
env: | |
SENTRY_ENVIRONMENT: ${{ secrets.SENTRY_ENVIRONMENT }} | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
ACM_CERTIFICATE_ARN: ${{ secrets.ACM_CERTIFICATE_ARN }} | |
CDN_DOMAIN_NAME: ${{ secrets.CDN_DOMAIN_NAME }} |