Deploy to staging from GH staging branch

This commit is contained in:
Michael Jackson 2019-01-15 14:57:32 -08:00
parent 7800180d3b
commit a33a7c3ff5
1 changed files with 8 additions and 1 deletions

View File

@ -10,10 +10,17 @@ before_install:
- openssl aes-256-cbc -K $encrypted_a35d52d190dd_key -iv $encrypted_a35d52d190dd_iv
-in secret_key.enc -out secret_key -d
script:
- NODE_ENV=production npm run build
- npm run lint
- NODE_ENV=$([ "$TRAVIS_BRANCH" == "master" ] && echo "production" || echo "staging") npm run build
before_deploy:
- npm install -g firebase-tools
deploy:
- provider: script
skip_cleanup: true
script: $(npm bin -g)/firebase deploy --project unpkg-staging --message "https://travis-ci.org/$TRAVIS_REPO_SLUG/builds/$TRAVIS_BUILD_ID"
--token $FIREBASE_TOKEN --non-interactive --force
on:
branch: staging
- provider: script
skip_cleanup: true
script: $(npm bin -g)/firebase deploy --project unpkg-gcp --message "https://travis-ci.org/$TRAVIS_REPO_SLUG/builds/$TRAVIS_BUILD_ID"