Skip to content

pipeline update

pipeline update #14

name: Deploy and Trigger Pipeline
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20.11.1'
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.ZENITSU_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.ZENITSU_SECRET_KEY }}
aws-region: 'eu-central-1'
- name: Assume IAM Role
id: assume-role
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::381492264897:role/lambda_role
role-duration-seconds: 3600
aws-region: eu-central-1
env:
AWS_DEFAULT_OUTPUT: json
- name: Install CDK dependencies
run: npm install -g aws-cdk
- name: Synthesize CDK app
run: |
cd infrastructure
npm ci
npm run build
npx cdk synth --verbose
- name: Show CDK diff
run: |
cd infrastructure
npx cdk diff --verbose
- name: Deploy CDK stack
run: |
cd infrastructure
npx cdk deploy --require-approval never --verbose