Skip to content

LiveBootCamp AWS Deploy #7

LiveBootCamp AWS Deploy

LiveBootCamp AWS Deploy #7

Workflow file for this run

name: LiveBootCamp AWS Deploy
on:
workflow_call:
workflow_dispatch:
permissions:
id-token: write
contents: read
env:
AWS_REGION: "${{ vars.AWS_REGION }}"
JWT_SECRET: ${{ secrets.JWT_SECRET }}
AWS_GITHUB_ACTIONS_ROLE: ${{ secrets.AWS_GITHUB_ACTIONS_ROLE }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
deployment:
name: AWS Deployment
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Node dependencies
run: cd cdk && npm ci --ignore-scripts
- name: Transpile Lambda functions to Javascript
run: |
cd cdk
npm run lambda::build
# - uses: actions/upload-artifact@v4
# if: always()
# with:
# path: cdk/src/lambda
# retention-days: 1
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.AWS_GITHUB_ACTIONS_ROLE }}
aws-region: ${{ env.AWS_REGION }}
- name: CDK Deploy
run: |
cd cdk && npx cdk deploy --require-approval never --ci