If you have the master branch /docs folder source setting enabled and your /docs folder with your site's source files was removed from the root of your repository on the master branch, your GitHub Pages site will not build.

If your GitHub Pages site fails to build because your /docs folder on the master branch was moved or deleted, you'll see a message in GitHub Pages settings that looks like this:

missing-docs-folder-page-build-failure-message

Check GitHub Pages build error messages

  1. On GitHub Enterprise, navigate to the main page of the repository.

  2. Under your repository name, click Settings. Repository settings button

  3. Read any applicable build error message under "GitHub Pages."

Resolving the build error

If your /docs folder was accidently moved, you can try moving the /docs folder back to the root of your repository on the master branch.

If your /docs folder was deleted, you must either:

  • use Git to revert or undo the deletion of your /docs folder with your site's source files
  • recreate a /docs folder in the root of your repository on the master branch and add or recreate your site's source files in this folder
  • change the source settings to gh-pages or the master branch and add or recreate your site's source files on the gh-pages or master branch