3

Actually it linked to my previously asked question in which i asked for local deployment of firebase functions, because it takes too time(due to slow network) and resources in deploying each time,

then I got an idea,
Heroku and other platforms provides Automatic Deployment feature with Github and Dropbox, so when i push code in specified branch it deploy it automatically and I used it many times, it is awesome

enter image description here

I thought that if I push(which is very light weight, in sense of both time and resources) code on GitHub and Firebase automatically deploy it, it will be wonderful for me, then i will make a spare branch (e.g: dev-branch) and continuously push my changes in it to see in action (i already have a quick way to push code on github)

So how can i deploy firebase functions using Github,
Either this facility is already available in firebase,
if not available then can i do it myself(by using github developer tool etc.)?

Thankyou,
Inzamam Malik.

Community
  • 1
  • 1
Inzamam Malik
  • 3,238
  • 3
  • 29
  • 61
  • While it is definitely possible to build something like that: how would deploying from a git repo be faster than deploying using the Firebase CLI? – Frank van Puffelen Mar 24 '17 at 13:57
  • 1
    There is no built-in way to do it, but it's definitely possible through a service like [Travis CI](https://travis-ci.com/) – Michael Bleigh Mar 24 '17 at 18:52

1 Answers1

1

I got tired of writing custom logic using firebase-tools for deployment of each of my different projects, so I created firebase-ci.

Basically, it deploys to the project associated with the branch name set in .firebaserc (uses firebase-tools internally)

For example:

{
  "projects": {
    "prod": "prod-firebase",
    "master": "dev-firebase",
    "default": "dev-firebase"
  }
}

Deploys to dev-firebase project on master branch, and prod-firebase project when on the prod branch.

Disclosure: I am one of the authors of firebase-ci, which is mentioned in this answer.

Scott
  • 1,575
  • 13
  • 17