Skip to content

Deploy Angular app to github.io pagesΒΆ

Create application using angular-cli ......

Bash
npm install -g @angular/cli
npm new <appname>

Install angular-cli-ghpages

Bash
npm install -g angular-cli-ghpages

Build

Bash
ng build --prod --base-href="https://<username>.github.io/<reponame>/"

Deploy

Bash
npx angular-cli-ghpages --dir=dist/apps/<appname>

Change repo setting to use gh-pages: image ghpages