有关发布源的更多信息,请参阅“关于 GitHub Pages”。
选择发布源
Before you configure a publishing source, make sure the branch or folder you want to use as your publishing source already exists in your repository. For example, before you can publish your project site from the /docs
folder on the master
branch of your repository, you or a collaborator must create a /docs
folder on the default master
branch of your repository.
-
在 GitHub Enterprise Server 上,导航到站点的仓库。
-
在仓库名称下,单击 Settings(设置)。
-
在“ GitHub Pages", use the Source drop-down menu and select a publishing source.
GitHub Pages 站点发布问题疑难排解
注:如果网站 的源文件位于默认发布源 - master
(对于用户和组织站点)或 gh-pages
(对于项目站点)- 但您的站点 未自动发布,请确保有一个拥有管理权限和经验证的电子邮件地址的人已推送到默认发布源。
If you choose the docs
folder on the master
branch as your publishing source, then later remove the /docs
folder from that branch in your repository, your site won't build and you'll get a page build error message for a missing /docs
folder. 更多信息请参阅“关于 GitHub Pages 站点的 Jekyll 构建错误疑难排解”。