npm install
npm start
npm run build
Static output (deploy this folder):
dist/portfolio-app/browser/GitHub Pages serves repository sites under a sub-path:
https://<user>.github.io/<repo>/This repo includes a ghpages build configuration that:
baseHref and deployUrl (defaults to /portfolio/)npm run build:ghpages
Which runs:
ng build --configuration ghpages
This repo includes GitHub Pages workflow.
In GitHub:
Push to main (or portfoliowebsite) and the workflow will build and deploy.
Note: Angular (SSR-capable) builds emit dist/portfolio-app/browser/index.csr.html; the workflow copies it to index.html for GitHub Pages.
angular-cli-ghpagesIf you prefer a manual publish flow:
npm run build:ghpages
npx angular-cli-ghpages --dir dist/portfolio-app/browser
portfolio-appUpdate the GitHub Pages path in angular.json:
projects.portfolio-app.architect.build.configurations.ghpages.baseHrefprojects.portfolio-app.architect.build.configurations.ghpages.deployUrlSet both to /<your-repo-name>/.