-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.25 KB
/
deploy-staging.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
48
49
name: Deploy staging
on:
push:
branches:
- "master"
jobs:
Deploy:
runs-on: ubuntu-latest
environment:
name: staging
url: https://azupx3hm25.execute-api.eu-central-1.amazonaws.com/staging/graphql
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '12'
- uses: actions/cache@v2
with:
path: |
'**/node_modules'
'**/build_output'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install
- name: Build node_modules for Lambda
run: sudo yarn build:lambda
- name: Prepare serverless.yml
run: cp serverless-sample.yml serverless.yml
- name: Prepare env.yml
run: cp env-sample.yml env.yml
- name: Prepare for deploy
run: sudo yarn predeploy
- name: Deploy to AWS
env:
SERVERLESS_ACCESS_KEY: ${{ secrets.SERVERLESS_ACCESS_KEY }}
DB_USERNAME: ${{ secrets.DB_USERNAME }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DB_NAME: ${{ secrets.DB_NAME }}
uses: serverless/github-action@master
with:
args: deploy --stage staging