Reputation: 974
Is there any way I can automate my "firebase deploy" pushes to Firebase Hosting using a script? I can't seem to figure out how to do this.
Thanks.
Upvotes: 4
Views: 3390
Reputation:
Open your terminal and run this command to generate a new CI token. this will help a lot if you are deploying your project on GitHub
npm install -g firebase-tools
firebase deploy --non-interactive --token $FIREBASE_TOKEN
to complete the automation process
firebase login:ci
personal suggestion: click here to see steps of using all commands
Upvotes: 0
Reputation: 61
Here's a couple different approaches:
Firebase's own David East on how to do it with Travis and GitHub https://www.youtube.com/watch?v=QLVzozWDYAs
I took an alternate approach, since my automation tool is written in java.
Bottom line - no matter what your automation binary is written in, as long as it can shell out and run your [deploy.sh] script in the same shell that firebase is installed in, you should be good to go.
Upvotes: 2