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 

It is only necessary to set the the--base-href flag once, next time you build the project you can simply run:

🌹  ng build --prod

In order to compile images correctly use path as following:

'./assets/images/image.png'

1 COMMENT