我们经常发布文档更新,此页面的翻译可能仍在进行中。有关最新信息,请访问英文文档。如果此页面上的翻译有问题,请告诉我们
文章版本: Enterprise Server 2.15

此版本的 GitHub Enterprise 将停止服务 此版本的 GitHub Enterprise 已停止服务 2019-10-16. 即使针对重大安全问题,也不会发布补丁。 For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

Configuring a publishing source for your GitHub Pages site

If you use the default publishing source for your GitHub 页面 site, your site will publish automatically. You can also choose to publish your project site from a different branch or folder.

GitHub 页面 可用于具有 GitHub Free 的公共仓库,以及具有 GitHub Pro、GitHub Team、GitHub Enterprise Cloud 和 GitHub Enterprise Server 的公共和私有仓库。

People with admin permissions for a repository can configure a publishing source for a GitHub 页面 site.

For more information about publishing sources, see "About GitHub 页面."

本文内容

Choosing a publishing source

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 master branch of your repository.

  1. On GitHub Enterprise, navigate to your site's repository.

  2. 在仓库名称下,单击 Settings(设置)

    仓库设置按钮

  3. Under "GitHub 页面", use the Source drop-down menu and select a publishing source.

    Drop down menu to select a publishing source

Troubleshooting publishing problems with your GitHub 页面 site

Note: If your site's source files are located in the default publishing source—master for user and organization sites or gh-pages for project sites—but your site has not published automatically, make sure someone with admin permissions and a verified email address has pushed to the default publishing source.

If you remove the /docs folder from the master branch after choosing the docs folder as your publishing source, your site won't build and you'll get a page build error message for a missing /docs folder. For more information, see "Troubleshooting Jekyll build errors for GitHub 页面 sites."

问问别人

找不到要找的内容?

联系我们