Description of how to integrate an Angular (or any other) web app with AWS CI/CD pipelines
For this example I will be using a Tic Tac Toe app I have created previously with:
ng create __app-name__
before deploying your app you need a buildspec.yaml file in your root directory
It should look something like below
version: 0.1
phases:
install:
commands:
- echo installing nodejs...
- curl -sL https://deb.nodesource.com/setup_14.x | bash -
- apt-get install -y nodejs
pre_build:
commands:
- echo installing dependencies...
- npm i -g @angular/cli
- npm install --save-dev @angular/cli@latest
- npm install
build:
commands:
- echo building...
- ng build --prod
artifacts:
files:
- "**/*"
discard-paths: no
base-directory: "dist/aws-test-app*"
Open Amplify
- Click "get started" under Amplify Hosting
- Connect your git repo
- Select Repository and branch
- configure build options (.yaml file we created earlier) ![yaml](
- save and depoly
after this feel free to configure other settings in the App management console like adding a testing enviroment, adding a costom domain or adding tests.