Open In App

How to Deploy Angular Application to Firebase using GitHub ?

Many of us unable to showcase our small-scale or personal projects over the web. Since hosting these projects are a bit difficult and also costs a few bucks sometimes.
In this article, we will show you how to deploy your Angular application at no cost without buying any domain or hosting provider. Also, tired of deploying your application every iteration? Let’s also set up automatic builds and deploys using GitHub.

Initialize Git and push the project to the GitHub repository

To configure automated builds and deployments to Firebase, the project must first be pushed to a GitHub repository. 



Publish to GitHub

Bundle Angular App for Production

By default, all angular projects are set for development so let’s build our project and generate our dist file.



ng build --prod

Download Firebase and setup for deployment

The Firebase Command Line Interface (CLI) Tools can be used to test, manage, and deploy your Firebase project from the command line.

npm install -g firebase-tools
firebase login

Create a Firebase project for deployment

firebase init

firebase deploy

Now your Angular application is deployed with Firebase successfully.

Article Tags :