-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
34 lines (34 loc) · 872 Bytes
/
.travis.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
language: node_js
branches:
only:
- master
node_js:
- '10'
before_install:
- openssl aes-256-cbc -K $encrypted_65329f5fbcde_key -iv $encrypted_65329f5fbcde_iv
-in servicesAccounts.tar.enc -out functions/servicesAccounts.tar -d
- tar xvf ./functions/servicesAccounts.tar -C ./functions
- ls ./functions
- npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
install:
- npm install --force-online
jobs:
include:
- stage: Deploy Dev
if: type = pull_request
env:
- NODE_ENV=production
- STAGE=production
- HOST=dev.ntgdt.com
script:
- npm install --only=dev --force-online
- npm run deploy:pre
- stage: deploy PRO
if: branch = master AND NOT type = pull_request
env:
- NODE_ENV=production
- STAGE=production
- HOST=ntgdt.com
script:
- npm install --only=dev --force-online
- npm run deploy:pro