我成功通过以下方式将有角度的应用程序部署到了Github Pages:
ng add angular-cli-ghpages
ng deploy --base-href=https://[username].github.io/[repo]/ --name=[username] --email=[email]
它一直有效,直到我想部署新更改并使用ng deploy
。
此后,网站一片空白,重复以上命令没有任何改变。这可能是什么原因?
REPO::https://github.com/JoseTurron/flight-booking-cdv
GH PAGES::https://joseturron.github.io/flight-booking-cdv/
答案 0 :(得分:0)
它似乎在没有指定 --base-href 的情况下在初始部署时对我有用,但我必须通过提供 --base-href=/my-repo-name/ 来启动任何后续部署以使其工作后续部署。
ng deploy --base-href=/my-repo-name/