About publishing sources
Your GitHub Pages site will publish whenever changes are pushed to a specific branch. You can specify which branch and folder to use as your publishing source. The source branch can be any branch in your repository, and the source folder can either be the root of the repository (/
) on the source branch or a /docs
folder on the source branch. Whenever changes are pushed to the source branch, the changes in the source folder will be published to your GitHub Pages site.
Warning: If your site administrator has enabled Public Pages, GitHub Pages sites are publicly available on the internet, even if the repository for the site is private or internal. If you have sensitive data in your site's repository, you may want to remove the data before publishing. For more information, see "Configuring GitHub Pages for your enterprise" and "About repositories."
Publishing from a branch
-
Make sure the branch you want to use as your publishing source already exists in your repository.
-
On GitHub Enterprise Server, navigate to your site's repository.
-
Under your repository name, click Settings.
-
In the left sidebar, click Pages.
-
Under "GitHub Pages", use the None or Branch drop-down menu and select a publishing source.
-
Optionally, use the drop-down menu to select a folder for your publishing source.
-
Click Save.
Troubleshooting publishing from a branch
Note: If your site has not published automatically, make sure someone with admin permissions and a verified email address has pushed to the publishing source.
If you choose the docs
folder on any 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. For more information, see "Troubleshooting Jekyll build errors for GitHub Pages sites."