-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (51 loc) · 1.54 KB
/
deploy-development.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
50
51
name: Deploy to development
on:
push:
branches:
- develop
jobs:
Testing:
env:
DATABASE_URL: ${{secrets.DATABASE_URL}}
REDIS_HOST: ${{secrets.DEV_REDIS_HOST}}
REDIS_PASS: ${{secrets.DEV_REDIS_PASS}}
REDIS_PORT: ${{secrets.DEV_REDIS_PORT}}
REDIS_TTL: ${{secrets.DEV_REDIS_TTL}}
REDIS_ACTIVE: ${{secrets.DEV_REDIS_ACTIVE}}
JWT_KEY: ${{secrets.DEV_JWT_KEY}}
JWT_EXPIRES: ${{secrets.DEV_JWT_EXPIRES}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'npm'
- run: npm install
- run: npm test
Deploy:
env:
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
DATABASE_URL: ${{secrets.DEV_DATABASE_URL}}
REDIS_HOST: ${{secrets.DEV_REDIS_HOST}}
REDIS_PASS: ${{secrets.DEV_REDIS_PASS}}
REDIS_PORT: ${{secrets.DEV_REDIS_PORT}}
REDIS_TTL: ${{secrets.DEV_REDIS_TTL}}
REDIS_ACTIVE: ${{secrets.DEV_REDIS_ACTIVE}}
JWT_KEY: ${{secrets.DEV_JWT_KEY}}
JWT_EXPIRES: ${{secrets.DEV_JWT_EXPIRES}}
needs: Testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'npm'
- run: npm ci
- run: npm install -g serverless
- run: sed -i '/profile:/d' serverless.yml
- run: npm run db:deploy
- run: npm run db:generate
- run: serverless deploy -s dev