我想将一个Angular应用程序部署到GitHub页面,但是将gh-pages分支设置为源时,会显示README文件的内容。
我已经尝试了官方推荐的方法:
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后,终端会显示以下信息:
User@JoseTurron MINGW64 /i/projekt-zaliczeniowy-cdv (gh-pages)
$ ngh
index.html could not be copied to 404.html. This does not look like an angular-cli project?!
(Hint: are you sure that you have setup the directory correctly?)
Diagnostic info: ENOENT: no such file or directory, stat 'I:\projekt-zaliczeniowy-cdv\dist\index.html'
�� Uploading via git, please wait...
� Successfully published via angular-cli-ghpages! Have a nice day!
我已经没有任何解决这个问题的想法了,感谢任何建议!