Skip to main content

Deploy an Angular Project To Netlify with GitHub

·252 words·2 mins
Programing Web development Angular Frontend Development Netlify
Anurag Konduru
Author
Anurag Konduru
Software Engineer (Front-End Developer/Linuxuser/Software Explorer)

Setting up projects for deployment has become a breeze! However, there are some straightforward steps that, if overlooked, might lead to hiccups when deploying an Angular project to Netflix.

prerequisites:
#

  1. Build your Angular project.
  2. Upload your project to GitHub or any equivalent platform.
  3. Create a Netlify account, linking it with your GitHub or other accounts.

Things to do in Netlify:
#

  • first select Add a New Site and select the option import an Existing project.
    Alt text
  • select Deploy With GitHub or other option.
    Alt text
  • Give Authorization to Netlify for your Git account.
  • And select to give permission to one selected projects or your whole git projects and Save.
    Alt text
    Alt text
  • Now you should be able to see your projects in Netlify and select a project.
    Alt text
  • It Will auto detect your project and you can add environment variables if required. and deploy the project you can it will be deployed to s <random Generated text >.netlify.app and you can change the random text to the appropriate name here and your project is deployed.
    Alt text
  • It Will be similar to other frameworks as well. But for Angular there are some changes to be done before it is Deployed.

Things to Do in Angular:
#

  • In angular.json file Change the values for the size limits maximumWarning,maximumError,maximumWarning,maximumError
    Alt text
  • Eg:
    Alt text
  • Match The outputPath in angular Config and netlify Publish directory.
    Alt text
    Alt text

With these changes the deployment should work unless your project requires custom changes and you can also Buy a Domain to Host Your Project and you can set it up in Netlify.

Related

Angular Install: How to Install Angular CLI
·67 words·1 min
Programing Web development Angular Frontend Development
A brief on how to install Angular
Angular roadmap: Roadmap for Learning Angular
·120 words·1 min
Programing Web development Angular Frontend Development
A road map or guide for beginners learning angular.
Angular Directives: Guiding the DOM with Instructions
·687 words·4 mins
Programing Web development Angular Frontend Development
Directives: # Directives are instructional elements within the DOM.