When you unpublish your site, your current deployment is removed and the site will no longer be available. Any existing repository settings or content will not be affected.
Unpublishing a site does not permanently delete the site. For information on deleting a site, see "Deleting a GitHub Pages site."
Unpublishing a project site
On your enterprise, navigate to the main page of the repository.
gh-pagesbranch exists in the repository, delete the
gh-pagesbranch. For more information, see "Creating and deleting branches within your repository."
gh-pagesbranch was your publishing source, your site is now unpublished and you can skip the remaining steps.
Under your repository name, click Settings. If you cannot see the "Settings" tab, select the dropdown menu, then click Settings.
In the "Code and automation" section of the sidebar, click Pages.
Under "GitHub Pages", use the branch dropdown menu and select None.
Unpublishing a user or organization site
- On your enterprise, navigate to the main page of the repository.
- Delete the branch that you're using as a publishing source, or delete the entire repository. For more information, see "Creating and deleting branches within your repository" and "Deleting a repository."
Re-enabling a site that has been unpublished
Unpublishing your GitHub Pages site removes your current deployment. To make your site available again, you can create a new deployment.
Re-enabling a project site
- Configure your publishing source to publish from a branch of your choosing. For more information, see "Configuring a publishing source for your GitHub Pages site."
- Commit to your publishing source to create a new deployment.
Re-enabling a user or organization site
Because your publishing source was deleted during unpublishing, you will need to create a new publishing source and configure a new GitHub Pages site. For more information, see "Configuring a publishing source for your GitHub Pages site."