-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (45 loc) · 1.28 KB
/
sst.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: SST workflow
on: [push]
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:
TestAndBuild:
runs-on: ubuntu-latest
steps:
- name: Git clone the repository
uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
- name: Installing dependencies
run: |
bun install
- name: Run tests
run: |
bun run test
- name: Run build
run: |
bun run build
DeployApp:
runs-on: ubuntu-latest
environment: Production
needs: TestAndBuild
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
env:
NEXT_PUBLIC_GA_MEASUREMENT_ID: ${{ vars.NEXT_PUBLIC_GA_MEASUREMENT_ID }}
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: Installing dependencies
run: |
bun install
- name: Deploy app
run: |
bun sst deploy --stage prod