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:
Check GitHub Pages build error messages
On GitHub Enterprise, navigate to the main page of the repository.
Under your repository name, click Settings.
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 themaster
branch and add or recreate your site's source files in this folder -
change the source settings to
gh-pages
or themaster
branch and add or recreate your site's source files on thegh-pages
ormaster
branch