-
Notifications
You must be signed in to change notification settings - Fork 36
/
.travis.yml
30 lines (28 loc) · 1.08 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
env:
- NODEJS_VER=12.16.2
language: node_js
node_js: $NODEJS_VER
warnings_are_errors: true
jobs:
include:
- stage: Push-Requests
if: ( branch = master || branch = staging || branch = dev ) AND type = push
script:
- echo "CI/CD Starting for $BRANCH"
- jq ".homepage = \"$HOST_URL\"" package.json > package_updated.json && mv package_updated.json package.json
- npm install --production
- npm run build
- npm install -g firebase-tools
- firebase use $FIREBASE_PROJECT --token $FIREBASE_TOKEN
- firebase deploy --only hosting:$FIREBASE_HOSTING_ID --token $FIREBASE_TOKEN
after_success:
- echo "Deployed Successfully"
- stage: Dev-PR
if: branch = dev AND type = pull_request
script:
- echo "CI/CD Starting for Development Pull Request"
- jq ".homepage = \"$HOST_URL_PR/$TRAVIS_PULL_REQUEST\"" package.json > package_updated.json && mv package_updated.json package.json
- npm install --production
- npm run build
after_success:
- echo "CI Successfully"