how to publish to github pages?

前端 未结 3 540
Happy的楠姐
Happy的楠姐 2021-02-10 05:17

i am having trouble understanding some basic instructions on publishing to github pages. There is a new way to publish Angular projects made with Angular Cli; i am following dir

3条回答
  •  情深已故
    2021-02-10 05:42

    Try this (for mac) :

    1. $ npm install -g angular-cli-ghpages

    2. Push your code to a github repo and then run this in terminal: ng build --env=prod --base-href "https://yourgithubusername.github.io/yourprojectname/" here 'yourprojectname' is the name of your github repo, not your local repo.

    3. If everything works fine, then run : sudo angular-cli-ghpages and enter password.

提交回复
热议问题