-
-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (36 loc) · 972 Bytes
/
main.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
on:
push:
paths:
- .github/workflows/main.yml
- mojacoder-backend/**
branches:
- master
name: Auto Deploy to AWS
jobs:
deploy:
name: Auto Deploy
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Dependencies
working-directory: mojacoder-backend
run: |
yarn global add aws-cdk
yarn
cd lambda
for dir in ./*; do
cd $dir
yarn
cd ..
done
- name: Deploy to AWS
working-directory: mojacoder-backend
run: $(yarn global bin)/cdk deploy --require-approval never
env:
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}