forked from ONEARMY/community-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
34 lines (32 loc) · 871 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
node_js:
- '8'
dist: trusty
sudo: false
cache:
directories:
- node_modules
addons:
chrome: stable
before_script:
- npm install -g firebase-tools
script:
- npm run build
before_deploy:
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH"
- export REACT_APP_BRANCH=$(if [ "$TRAVIS_BRANCH" == "production" ]; then echo "PRODUCTION"; else echo "STAGING"; fi)
- echo "REACT_APP_BRANCH=$REACT_APP_BRANCH"
- export FIREBASE_TOKEN=$(if [ "$TRAVIS_BRANCH" == "production" ]; then echo "$FIREBASE_PRODUCTION_TOKEN"; else echo "$FIREBASE_STAGING_TOKEN"; fi)
deploy:
- provider: script
script: bash scripts/deploy.dev.sh
skip_cleanup: true
on:
branch: master
- provider: script
script: bash scripts/deploy.prod.sh
skip_cleanup: true
on:
branch: production
after_deploy:
- echo "REACT_APP_BRANCH=$REACT_APP_BRANCH"