-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.2 KB
/
api.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
name: Api
on:
push:
paths:
- "packages/api/**"
jobs:
build-and-deploy:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 9
- name: Use Node.js ${{matrix.node-version}}
uses: actions/setup-node@v4
with:
node-version: ${{matrix.node-version}}
cache: "pnpm"
- name: Install dependencies
run: pnpm i --filter api --config.dedupe-peer-dependents=false
- name: Build application
working-directory: ./packages/api
run: pnpm build
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Build
working-directory: ./packages/api
run: sam build
- name: SAM Deploy
working-directory: ./packages/api
run:
yes | sam deploy --stack-name wakeup-fullstack-challenge-api --capabilities CAPABILITY_IAM