From 4bd1d5b51d7db43913af6192f0a72caddd4830f6 Mon Sep 17 00:00:00 2001 From: Ru Chern Chong Date: Sun, 5 Nov 2023 23:31:49 +0800 Subject: [PATCH] Add GitHub Actions --- .github/workflows/sst.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/sst.yml diff --git a/.github/workflows/sst.yml b/.github/workflows/sst.yml new file mode 100644 index 0000000..b912ba5 --- /dev/null +++ b/.github/workflows/sst.yml @@ -0,0 +1,32 @@ +name: SST workflow +on: + push: + branches: + - main + pull_request: + branches: + - main + +# Concurrency group name ensures concurrent workflow runs wait for any in-progress job to finish +concurrency: + group: merge-${{ github.ref }} + +permissions: + id-token: write # This is required for requesting the JWT + contents: read # This is required for actions/checkout + +jobs: + DeployApp: + runs-on: ubuntu-latest + steps: + - name: Git clone the repository + uses: actions/checkout@v3 + - uses: oven-sh/setup-bun@v1 + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ vars.ROLE_TO_ASSUME }} + aws-region: ap-southeast-1 + - name: Deploy app + run: | + bun install && bun sst deploy --stage prod