-
Notifications
You must be signed in to change notification settings - Fork 13
47 lines (38 loc) · 1.15 KB
/
be-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
47
name: Deploy backend (main)
on:
push:
branches:
- main
paths:
- 'starter-dev-backend/**'
workflow_dispatch:
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
defaults:
run:
working-directory: starter-dev-backend
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
cache-dependency-path: starter-dev-backend/yarn.lock
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Install Serverless
run: npm i -g serverless@3
- name: Configure credentials
run: |
serverless config credentials --provider aws --profile starterdev --key $AWS_ACCESS_KEY_ID --secret $AWS_SECRET_ACCESS_KEY
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Deploy
run: serverless deploy --stage production --region us-east-1