4.9 KiB
title, intro, redirect_from, product, permissions, versions, topics, shortTitle
| title | intro | redirect_from | product | permissions | versions | topics | shortTitle | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Unpublishing a GitHub Pages site | You can unpublish your {% data variables.product.prodname_pages %} site so that your current deployment is removed and the site is no longer available. This is different from deleting the site. |
|
{% data reusables.gated-features.pages %} | People with admin or maintainer permissions for a repository can unpublish a {% data variables.product.prodname_pages %} site. |
|
|
Unpublish Pages site |
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 "AUTOTITLE."
{% ifversion pages-custom-workflow %}
{% data reusables.repositories.navigate-to-repo %}
- Under {% data variables.product.prodname_pages %}, next to the Your site is live at message, click {% octicon "kebab-horizontal" aria-label="the horizontal kebab icon" %}.
- In the menu that appears, select Unpublish site.

{% else %}
Unpublishing a project site
{% data reusables.repositories.navigate-to-repo %}
- If a
gh-pagesbranch exists in the repository, delete thegh-pagesbranch. For more information, see "AUTOTITLE." - If the
gh-pagesbranch was your publishing source, {% ifversion fpt or ghec %}skip to step 6{% else %}your site is now unpublished and you can skip the remaining steps{% endif %}. {% data reusables.repositories.sidebar-settings %} {% data reusables.pages.sidebar-pages %} - Under "{% data variables.product.prodname_pages %}", use the branch dropdown menu and select None.
{% data reusables.pages.update_your_dns_settings %}
Unpublishing a user or organization site
{% data reusables.repositories.navigate-to-repo %}
- Delete the branch that you're using as a publishing source, or delete the entire repository. For more information, see "AUTOTITLE" and "AUTOTITLE." {% data reusables.pages.update_your_dns_settings %}
{% endif %}
Re-enabling a site that has been unpublished
Unpublishing your {% data variables.product.prodname_pages %} site removes your current deployment. To make your site available again, you can create a new deployment.
{% ifversion pages-custom-workflow %}
Re-enable using {% data variables.product.prodname_actions %}
A successful workflow run in the repository for your site will create a new deployment. Trigger a workflow run to redeploy your site.
Re-enabling your site when publishing from a branch
- Configure your publishing source to publish from a branch of your choosing. For more information, see "AUTOTITLE."
- Commit to your publishing source to create a new deployment.
{% else %}
Re-enabling a project site
- Configure your publishing source to publish from a branch of your choosing. For more information, see "AUTOTITLE."
- 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 {% data variables.product.prodname_pages %} site. For more information, see "AUTOTITLE."
{% endif %}