From 89c91d6f1cd411dd2558e2f2c854dab95c417846 Mon Sep 17 00:00:00 2001 From: Kin Fei Lee Date: Tue, 17 Dec 2024 13:00:29 +0800 Subject: [PATCH] feat: add pipeline --- .github/workflows/pipeline.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/pipeline.yml diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml new file mode 100644 index 0000000..0245a76 --- /dev/null +++ b/.github/workflows/pipeline.yml @@ -0,0 +1,33 @@ +name: Pipeline + +on: + push: + + +jobs: + build: + name: Build & Deploy + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + run_install: true + + - name: Build frontend app + run: pnpm build + + - name: Build CDK stack + run: pnpm cdk:build + + - name: Deploy AWS CDK Stack + run: pnpm cdk:deploy + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: "ap-southeast-5"