This page describes the steps required to implementing an automated way of pushing your Angular 4 application without having to manually upload your Angular production build.
Specifically, the exact flow of the automation will do the following:
- Install required CLIs such as NPM, Yarn, and Angular CLI.
- Run ng build –prod
- Clear S3 bucket.
- Push build contents to S3 bucket.
- Create invalidation on AWS CloudFront
Your Angular project must utilize a Git repository that is supported by AWS CodeBuild: GitHub, AWS CodeCommit
Source: AWS CodeBuild FAQ
AWS S3 Setup
So, I know you’re probably like me. You have to consistently check your app for errors and sometimes you don’t cover all parts of your application.
What if there is a way to automate that process? Additionally, what if there’s a way to prevent your application from being deployed upon finding out that specific components don’t compile?
There is and it’s called Unit Testing.