Github Pages in Angular gets blank page after second deploy

1.1k views Asked by At

I successfully deployed an angular app to Github Pages with:

ng add angular-cli-ghpages
ng deploy --base-href=https://[username].github.io/[repo]/ --name=[username] --email=[email]

it worked until I wanted to deploy new changes and used ng deploy.

Afterwards the website went blank and repeating the commands above did not change anything. What may be the cause here?

REPO: https://github.com/JoseTurron/flight-booking-cdv
GH PAGES: https://joseturron.github.io/flight-booking-cdv/

1

There are 1 answers

0
Sean Anderson On

It seemed to work for me on the initial deploy without specifying a --base-href but I had to initiate any subsequent deploys by providing --base-href=/my-repo-name/ to get it to work for subsequent deploys.

ng deploy --base-href=/my-repo-name/