-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
42 lines (36 loc) · 1.03 KB
/
.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
35
36
37
38
39
40
41
42
language: node_js
node_js:
- '10.16'
branches:
only:
- master
- production
cache:
directories:
- node_modules
before_install:
- npm install -g yarn
before_script:
- npm install --quite firebase-tools -g
- firebase firebase --version
stages:
- name: pull Request
if: type = pull_request
- name: deploy Stage
if: branch = master AND NOT type = pull_request
- name: deploy Production
if: branch = production AND NOT type = pull_request
jobs:
include:
- stage: pull Request
script: yarn build
- stage: deploy Stage
script:
- yarn build:development
- firebase use --token $FIREBASE_TOKEN syshub-dev
- firebase deploy -m "Branch $TRAVIS_BRANCH, Commit $TRAVIS_COMMIT, Build $TRAVIS_BUILD_ID" --token $FIREBASE_TOKEN
- stage: deploy Production
script:
- yarn build
- firebase use --token $FIREBASE_TOKEN syshub-61377
- firebase deploy -m "Branch $TRAVIS_BRANCH, Commit $TRAVIS_COMMIT, Build $TRAVIS_BUILD_ID" --token $FIREBASE_TOKEN