This repository has been archived by the owner on Dec 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 660
Auto Deploy to Firebase Notes
Chuck Horton edited this page Jan 14, 2016
·
2 revisions
- Use
firebase login:ci
to generate authentication token - Add Environment Variable called
FIREBASE_TOKEN
, put generated token in Value field - Make sure you put double quotes around token in Value field
- Go to https://travis-ci.org/PolymerElements/polymer-starter-kit/settings to do so
- Do not use
--non-interactive
option for firebase deploy when using a token. It causes authentication error - Don't put {} around
$FIREBASE_TOKEN
as some of the examples show
See current at https://github.com/PolymerElements/polymer-starter-kit/blob/master/travis-runner.sh#L23
deploy_firebase () {
# Deploying to Firebase! (https://polymer-starter-kit.firebaseapp.com)
echo Deploying to Firebase
# Making Changes to PSK for Firebase
sed -i.tmp 's/<!-- Chrome for Android theme color -->/<base href="\/">\'$'\n<!-- Chrome for Android theme color -->/g' app/index.html
sed -i.tmp "s/hashbang: true/hashbang: false/" app/elements/routing.html
cp docs/firebase.json firebase.json
# Starting Build Process for Firebase Changes
gulp
# Starting Deploy Process to Firebaseapp.com Server -- polymer-starter-kit.firebaseapp.com
firebase deploy --token "$FIREBASE_TOKEN" -m "Auto Deployed by Travis CI"
# Undoing Changes to PSK for Firebase
cp app/index.html.tmp app/index.html
cp app/elements/routing.html.tmp app/elements/routing.html
rm app/elements/routing.html.tmp
rm app/index.html.tmp
rm firebase.json
}