-
Notifications
You must be signed in to change notification settings - Fork 26
46 lines (35 loc) · 1008 Bytes
/
deploy.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: Deploy to AWS
on:
push:
branches:
- master
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
- uses: actions/checkout@v3
with:
submodules: true
- name: Install Typescript & serverless
run: |
npm i -g typescript
npm i -g serverless
- name: Install Dependencies
run: npm i
- name: Serverless AWS authentication
run: sls config credentials --provider aws --key ${{ secrets.ACCESS_KEY_ID }} --secret ${{ secrets.SECRET_ACCESS_KEY }}
- name: Copy production env
run: 'echo -e "${{secrets.ENV}}" > .env'
- name: Database migrations and generate db types
run: 'npx prisma migrate deploy && npx prisma generate'
- name: Compile typescript
run: 'tsc'
- name: Deploy Lambda functions
run: sls deploy