Deployment of Angular Application using Github Pages Last Updated : 10 Sep, 2020 Suggest changes Share Like Article Like Report There are various methods to deploy Angular Application such as Github Pages, Heroku, Firebase, etc. The Github provides the simplest way of all using the Github Pages. Steps to Create and Deploy Sample Angular Application to Github Pages: Install Node.js: a. Windows b. LinuxInstall Angular - CLICreate new project using Angular CLI: ng new gfg-example The above command will ask various questions for routing and Styling, press Enter to go with Default Values: ng new gfg-example After creation of project go to the project Directory using:cd gfg-example The structure of the Code will look like :Project Structure Go to src/app/app.component.html and Remove all the code and add the below code : html <h2 [ngStyle]="{'color':'#00FF00'}"> Geeks For Geeks Example </h2> <h3> Simple App Deployment using Github Pages </h3> Now run the Angular App locally using:npm start After the App Compiles Successfully, go to Browser and Open http://localhost:4200/ Output Angular Application Next, Stop the Angular AppGo to Github and create new Repository with the name according to your preferenceAfter creation of Github Repo, Go to the project dir and open Command LinePush the Code to Git using following commands: git init git add . git commit -m "Initial Commit" git remote add origin https://github.com/<username>/<reponame>.git git push -u origin master Now, go to github repo and your code should be uploaded to master branch on githubNext Install the angular-gh-pages using npm:npm install -g angular-cli-ghpages Now, Production Build the Application using:ng build --prod --base-href "https://<username>.github.io/<reponame>/" Atlast, create the gh-pages branch, also upload the build and bundled code to this branch using :ngh --dir dist/gfg-example Remember that the project name we are using from start is gfg-example, if you have different project-name then instead of the last command use: ngh --dir dist/<project-name> Successful Deployment Now go to the Settings tab parallel to Code in Github Repo and under Github Pages you will find the Link for your deployed application:Setting Tab, Github Repo Open the URL and You will get our Angular App Deployed:Deployed App Advertise with us Next Article Deployment of Angular Application using Github Pages S shantanujoshi Follow Similar Reads Deployment of React Application using GitHub Pages Deploying a React application using GitHub Pages is an easy and efficient way to host your projects online for free. In this article, we will walk you through the steps to deploy your React app, making it accessible to users with a live URL. PrerequisitesA GitHub accountNode.js and npm installedBasi 4 min read 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. A 3 min read How to Add Custom Domain To GitHub Pages? Adding a custom domain to your GitHub Pages site can significantly enhance its professional appearance and make it easier for your audience to remember and access. This guide will walk you through the process step-by-step, ensuring you can easily configure your custom domain and optimize your site's 2 min read How to Deploy React App on Netlify Using Github? A React App is a web or mobile application that is built using the React library of JavaScript. It helps users create interactive, single-page, and dynamic applications. These applications are built using HTML, CSS, and JavaScript. Deployment of a React app can be done via GitHub, Netlify, or any ot 6 min read How to deploy MERN application on Vercel ? Vercel is a platform that caters to front-end developers by providing fast and dependable infrastructure to support the creation of innovative designs. With their services, teams can efficiently develop, preview, and deploy user-friendly interfaces. They offer support for over 35 front-end framework 4 min read Article Tags : Web Technologies AngularJS GitHub AngularJS-Basics Like