-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (37 loc) · 1.21 KB
/
deploy-cascade-api.yaml
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
# Create Github Workflow to deploy the "@cascade-protocol/api" to AWS if there are any changes
name: Deploy Cascade API Functions
on:
push:
branches:
- main
paths:
- "apps/api/**"
- ".github/workflows/deploy-cascade-api.yaml"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Setup Node.js environment
uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: |
bun install --ci
bun install --yarn
- name: Install AWS CDK
run: bun add --global aws-cdk
- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@master
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: "us-west-2"
- name: Build Cascade API Function
run: bun nx build @cascade-protocol/api
- name: Synth stack
run: bun run --filter=@cascade-protocol/api cdk synth
- name: Deploy stack
run: bun run --filter=@cascade-protocol/api cdk deploy --all --require-approval never