- Create branch
gh-pages
- Add package
npm i angular-cli-ghpages --save-dev
- Push branch and setup repo settings (Repo --> Settings --> Pages)
- Run build
ng build --configuration production --base-href "https://[github-username].github.io/[repo-name]/"
- Deploy app
npx angular-cli-ghpages --dir=dist/[project-name]
ng build --configuration production --base-href "https://annamelnyk.github.io/star-wars/" npx angular-cli-ghpages --dir=dist/star-wars