Merge pull request #20 from carpentries/bugfix/Handle-more-exceptions #39
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
# CI/CD for the main branch | |
name: CI/CD (main) | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
# No tests yet. | |
# test: | |
# uses: ./.github/workflows/test.yml | |
# No building phase yet. | |
# build: | |
# uses: ./.github/workflows/build.yml | |
deploy: | |
name: Deploy CDK | |
environment: staging | |
if: github.event_name == 'push' | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
- name: Install CDK dependencies | |
working-directory: ./cdk | |
run: | | |
npm install | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.AWS_CDK_ROLE_TO_ASSUME }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
mask-aws-account-id: true | |
- name: Deploy to AWS | |
working-directory: ./cdk | |
run: | | |
npx cdk deploy --require-approval=never EmailWorkerLambda |