Angular 5 - Deploy to Github Pages

Set gh-pages to be the brach to build from in repo settings

🌹  git checkout -b gh-pages
🌹  git push origin gh-pages
🌹  npm install -g angular-cli-ghpages
🌹  ng build --prod --base-href https://[username].github.io/[repo]/
🌹  ngh

Its only needed to set the the href once, so next build can be done by:

🌹  ng build --prod

In order to compile images correctly use path as following:

'./assets/images/image.png'

Reference: