Unable to change source branch in GitHub Pages

前端 未结 3 591
离开以前
离开以前 2021-02-01 13:29

I have created a simple web site for GitHub Pages. The source of the site is in the \"master\" branch and the generated web site (what I want to see published) is under the \"gh

3条回答
  •  清酒与你
    2021-02-01 13:49

    Ok so if you are using angular-cli-ghpages it will by default create a new branch gh-pages and publish to it.

    Now as a starter, like me, if you are using https://user-name.github.io/ and you want your app to be published from the master branch of your user-name.github.io you can follow the below steps.

    1. Make a production ready build using

      ng build --prod --base-href "/user-name.github.io/"
      
    2. Deploy to the master using angular-cli-ghpages using

      angular-cli-ghpages --branch=master
      

    Hope this helps.

提交回复
热议问题