Continuous deployment to Firebase hosting using Travis CI

Intro

Bart Wijnants
2 min readAug 15, 2018

Last night I had another multi million dollar web app idea. So of course first thing I do in the morning is start to work on my idea. Got to earn those dollars.

The first thing I need is some place on the internet where my customers can start handing me over their money. I want to move fast, so each time I change something I want to see the results immediately.

Enablers

Firebase is a platform by Google that provides hosting with minimal effort and for free. Travis is a hosted continuous integration solution that will allow me to deploy my changes to Firebase. GitHub is the place where I’ll be storing my precious code.

To build this stuff I installed Node.js and Docker on my laptop. I didn’t really need Docker but I did not feel like installing Ruby.

Let’s go to work

  • Go to Firebase and create a new project.
  • Create a new repository on GitHub.
  • Clone the repository locally.
  • Create a minimal index.html.
mkdir public
touch public/index.html
  • Connect GitHub repository to Firebase project using the Firebase tools.
    Don’t overwrite index.html when initializing.
npm install -g firebase-tools
firebase login
firebase init
  • Generate a Firebase CI token (and keep it handy).

--

--