I've found myself recently having an interest in all-things devops. I researched very briefly into how to setup continuous deployment using Netlify and integrating this with GitHub. From project creation to deployment, Netlify gave me the tools I didn't know I needed to quickly and easily deploy a website. The aim of this post is to show how to deploy a basic Angular app within 5 minutes.
Quickest way to create a new project is to use the Angular CLI.
cd C:\Users\lorna.watson\Documents\Projects\Workspace
ng new angular-netlify
cd angular-netlify
Push your new angular project to a new GitHub repository with all changes. Now install the Netlify Builder package and you will be prompted to enter both API ID and personal access token from your newly created Netlify site. If unsure how to find this, check out the link above.
ng add @netlify-builder/deploy
I haven't began to explore what's possible with Netlify yet - only just touched the surface. I signed up using my GitHub account and once signed in clicked the New site from Git button. Go through the mini wizard where you can connect your new Netlify site with your chosen GitHub repository.
Almost there. Change your build command and publish directory accordingly.
Build command:
ng build --prod
Publish directory: (can also be found looking in /angular.json at the output path)
dist/angular-netlify
And let's deploy baby...
ng deploy
Thank you for reading, hope this post was useful ๐๐
Top comments (0)