How to Deploy Angular Application to Firebase using GitHub ? Last Updated : 16 Jun, 2024 Summarize Comments Improve Suggest changes Share Like Article Like Report 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 repositoryTo configure automated builds and deployments to Firebase, the project must first be pushed to a GitHub repository. Open your project in Visual Studio Code.Open Source control Menu from the sidebar or simply use this shortcut ( press Ctrl+Shift+G) to open.Click on the Publish to GitHub button as shown below image.Publish to GitHubEnter the Repository Name as you desired and select the type of repository public or private.Wait for VS Code to publish your project to GitHub.Bundle Angular App for ProductionBy default, all angular projects are set for development so let's build our project and generate our dist file. Run the below command in your terminal of the project folder.ng build --prodNow after some time, the terminal generates a dist folder that is used for production and deploying.Download Firebase and setup for deploymentThe Firebase Command Line Interface (CLI) Tools can be used to test, manage, and deploy your Firebase project from the command line. To download and install the Firebase CLI run the following command with the administrator right:npm install -g firebase-toolsNow you're supposed to login into your firebase with your google account using the following command in your project terminal:firebase loginCreate a Firebase project for deploymentOpen the firebase website and go to your console by logging in through the link https://console.firebase.google.comAfter logging in, click on the "Add Project" button, then enter your project name and click on the "Create Project" button to create your Firebase project.Now it's time for initializing firebase in your project using the following command in your project terminal.firebase initFirebase provides various services like Database, Firestore, Functions, Hosting, Storage. Scroll down and select Hosting by pressing the space key to select and then press the Enter button to proceed further.After pressing enter, now the terminal asks to choose a project. Select the option "Use an existing project" and choose your project name of which you had created earlier pressing the enter key.Now the terminal asks you to choose your public directory that contains Hosting assets to be uploaded with firebase deploy.Enter the path of your dist folder which you had generated earlier which contains angular builds. In my case, it is dist/calc-angularNow select Yes for the option Set up automatic builds and deploys with GitHub? Enter your GitHub user name and repository name in the format username/repository for the option "For which GitHub repository would you like to set up a GitHub workflow?"For all other options just enter Yes or press enter key as you desired. Once Firebase initialization is completed, just enter the following command in your terminal to deploy your project.firebase deployOnce the command is executed it provides an output with the link to the firebase project console and URL of the deployed project through which you can access your application through any device.Now your Angular application is deployed with Firebase successfully. Comment More infoAdvertise with us U udaygajavalli Follow Improve Article Tags : Git GitHub AngularJS-Questions Similar Reads Frontend Developer Interview Questions and Answers Frontend development is an important part of web applications, and it is used to build dynamic and user-friendly web applications with an interactive user interface (UI). Many companies are hiring skilled Frontend developers with expertise in HTML, CSS, JavaScript, and modern frameworks and librarie 15+ min read Git Tutorial Git is an essential tool for developers, enabling them to manage and track project changes. Whether you're working on a solo project or collaborating with a team, Git keeps everything organized and under control. This Git Tutorial, from beginner to advanced, will give you a complete understanding of 12 min read Git Cheat Sheet Git Cheat Sheet is a comprehensive quick guide for learning Git concepts, from very basic to advanced levels. By this Git Cheat Sheet, our aim is to provide a handy reference tool for both beginners and experienced developers/DevOps engineers. This Git Cheat Sheet not only makes it easier for newcom 10 min read Git Rebase Git Rebase is a command that moves or combines a sequence of commits to a new base commit. It helps you place your changes on top of another commit, resulting in a cleaner, linear history, especially useful when working with feature branches. Unlike git merge, which creates a merge commit to combine 10 min read Version Control Systems Version Control Systems (VCS) are essential tools used in software development and collaborative projects to track and manage changes to code, documents, and other files. Whether you're working alone or as part of a team, version control helps ensure that your work is safe, organized, and easy to co 7 min read Git Bash Git bash is a command-line tool that is used as Git CLI emulation for Microsoft Windows. It provides a terminal-like interface and enables users to run Git commands and interact with a repository, as well as offering Unix command line features. Essentially, Git Bash brings the powerful functionaliti 9 min read How to Create a New Branch in Git? Git is a powerful and widely used version control system that helps developers manage code changes across projects efficiently. One of the fundamental features of Git is branching, which allows developers to diverge from the main line of development and work on different tasks or features independen 4 min read 50+ Essential Git Commands for Beginners and Developers Git is a powerful version control system that helps developers track changes, collaborate seamlessly, and manage codebases efficiently. Whether you're working on a solo project or collaborating with a team, Git ensures your work is safe, versioned, and organized. So weâll explore 50+ essential Git c 7 min read How to Set Git Username and Password in GitBash? Setting up your Git username and password is an essential step when working with Git repositories. It helps you confirm your identity when sending (pushing) changes or getting (pulling) updates from a remote repository. In this guide, we will show you how to easily set your Git username and password 3 min read How To Get Changes From Master Into a Branch in Git? In Git, branches are essential for organizing and managing development work. Whether you are working on a feature, a bug fix, or any other task, you often work in a separate branch so that the changes donât directly affect the master or main branch (the primary production branch).There are two main 3 min read Like