126 words
1 minute
Firebase CI setup

This is going to be a simple walkthrough of deploying a firebase site via cmd on a build machine of your choice. This post is going to assume that you already have a dev ops solution set up such as Azure DevOps or Jenkins.

  1. Install firebase-tools on your host machine if you did not already. npm install -g firebase-tools
  2. Log into firebase firebase login
  3. Get a deployment token. Do note, these tokens bind to the Google account you are signed into on and will give access to all firebase projects that the google account can access firebase login:ci
  4. Save that token as an env variable on your build machine
  5. To deploy all of your firebase assets. FIREBASE_TOKEN = the variable from step 4
    firebase deploy --token $(FIREBASE_TOKEN)

Further reading - Firebase CLI Reference

Firebase CI setup
https://edwardbeazer.com/posts/firebase-ci-setup/
Author
Edward Beazer
Published at
2022-06-30