Configuring a publishing source for GitHub Pages

You can configure GitHub Pages to publish your site's source files from master, gh-pages, or a /docs folder on your master branch for Project Pages and other Pages sites that meet certain criteria.

If your site is a User or Organization Page that has a repository named
<username>.[hostname]
or
<orgname>.[hostname]
, you cannot publish your site's source files from different locations. User and Organization Pages that have this type of repository name are only published from the master branch.

Default source settings for repositories without the username naming scheme

The default settings for publishing your site's source files depend on your site type and the branches you have in your site repository.

If your site repository doesn't have a master or gh-pages branch, your GitHub Pages publishing source is set to None and your site is not published.

After you've created either a master or gh-pages branch, you can set one as your publishing source so that your site will be published.

If you fork or upload your site repository with only a master or gh-pages branch, your site's source setting will automatically be enabled for that branch.

Enabling GitHub Pages to publish your site from master or gh-pages

To select master or gh-pages as your publishing source, you must have the branch present in your repository. If you don't have a master or gh-pages branch, you can create them and then return to source settings to change your publishing source.