For more information about publishing sources, see "About GitHub Pages."
Before you configure a publishing source, make sure the branch you want to use as your publishing source already exists in your repository.
On GitHub, 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.
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."
Your GitHub Pages site will always be deployed with a GitHub Actions workflow run, even if you've configured your GitHub Pages site to be built using a different CI tool. Most external CI workflows "deploy" to GitHub Pages by committing the build output to the
gh-pages branch of the repository, and typically include a
.nojekyll file. When this happens, the GitHub Actions worfklow will detect the state that the branch does not need a build step, and will execute only the steps necessary to deploy the site to GitHub Pages servers.
To find potential errors with either the build or deployment, you can check the workflow run for your GitHub Pages site by reviewing your repository's workflow runs. For more information, see "Viewing workflow run history." For more information about how to re-run the workflow in case of an error, see "Re-running workflows and jobs."
Note: GitHub Actions workflow runs for your GitHub Pages sites are in public beta for public repositories and subject to change. GitHub Actions workflow runs are free for public repositories.