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."
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.
- 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."
Unpublishing your GitHub Pages site removes your current deployment. To make your site available again, you can create a new deployment.
- 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.
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."