Inzamam Malik
Inzamam Malik

Reputation: 3435

How to deploy firebase functions using github

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.

Upvotes: 3

Views: 1528

Answers (1)

Scott
Scott

Reputation: 1615

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.

Upvotes: 1

Related Questions