diff --git a/content/pages/getting-started-with-github-pages/deleting-a-github-pages-site.md b/content/pages/getting-started-with-github-pages/deleting-a-github-pages-site.md new file mode 100644 index 000000000000..b357865dd492 --- /dev/null +++ b/content/pages/getting-started-with-github-pages/deleting-a-github-pages-site.md @@ -0,0 +1,31 @@ +--- +title: Deleting a GitHub Pages site +intro: 'You can delete a {% data variables.product.prodname_pages %} site.' +product: '{% data reusables.gated-features.pages %}' +permissions: 'People with admin or maintainer permissions for a repository can delete a {% data variables.product.prodname_pages %} site.' +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: + - Pages +shortTitle: Delete a GitHub Pages site +--- + +## Deleting your site + +You can delete your site in two ways: +- Delete the repository. For more information, see "[AUTOTITLE](/repositories/creating-and-managing-repositories/deleting-a-repository)." +- Change the source to the `None` branch. For more information, see [Deleting your site by changing the source](#deleting-your-site-by-changing-the-source) below. + +If you want to remove the current deployment of your site but do not want to delete the site, you can unpublish your site. For more information, see "[AUTOTITLE](/pages/getting-started-with-github-pages/unpublishing-a-github-pages-site)." +## Deleting your site by changing the source + +{% data reusables.pages.navigate-site-repo %} +{% data reusables.repositories.sidebar-settings %} +{% data reusables.pages.sidebar-pages %} +1. Under "Build and deployment", under "Source", select **Deploy from a branch** even if the site is currently using {% data variables.product.prodname_actions %}. +1. Under "Build and deployment", use the branch dropdown menu and select `None` as the publishing source. + ![Screenshot of Pages settings in a {% data variables.product.prodname_dotcom %} repository. A menu to select a branch for a publishing source, labeled "None," is outlined in dark orange.](/assets/images/help/pages/publishing-source-drop-down.png) +1. Click **Save**. diff --git a/content/pages/getting-started-with-github-pages/index.md b/content/pages/getting-started-with-github-pages/index.md index d0f66c8ebb11..63025ac74c24 100644 --- a/content/pages/getting-started-with-github-pages/index.md +++ b/content/pages/getting-started-with-github-pages/index.md @@ -18,11 +18,12 @@ children: - /about-github-pages - /creating-a-github-pages-site - /configuring-a-publishing-source-for-your-github-pages-site + - /deleting-a-github-pages-site + - /unpublishing-a-github-pages-site - /changing-the-visibility-of-your-github-pages-site - /creating-a-custom-404-page-for-your-github-pages-site - /securing-your-github-pages-site-with-https - /using-submodules-with-github-pages - - /unpublishing-a-github-pages-site shortTitle: Get started --- diff --git a/content/pages/getting-started-with-github-pages/unpublishing-a-github-pages-site.md b/content/pages/getting-started-with-github-pages/unpublishing-a-github-pages-site.md index 83470d48310d..a2bfd4c02a4d 100644 --- a/content/pages/getting-started-with-github-pages/unpublishing-a-github-pages-site.md +++ b/content/pages/getting-started-with-github-pages/unpublishing-a-github-pages-site.md @@ -1,6 +1,6 @@ --- title: Unpublishing a GitHub Pages site -intro: 'You can unpublish your {% data variables.product.prodname_pages %} site so that the site is no longer available.' +intro: '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.' redirect_from: - /articles/how-do-i-unpublish-a-project-page - /articles/unpublishing-a-project-page @@ -20,9 +20,11 @@ topics: shortTitle: Unpublish Pages site --- -{% ifversion pages-custom-workflow %} +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](/pages/getting-started-with-github-pages/deleting-a-github-pages-site)." -When you unpublish your site, the site will no longer be available. Any existing repository settings or content will not be affected. +{% ifversion pages-custom-workflow %} {% data reusables.repositories.navigate-to-repo %} 1. 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" %}. @@ -49,3 +51,31 @@ When you unpublish your site, the site will no longer be available. Any existing {% 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 + +1. Configure your publishing source to publish from a branch of your choosing. For more information, see "[AUTOTITLE](/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-from-a-branch)." +1. Commit to your publishing source to create a new deployment. + +{% else %} + +### Re-enabling a project site + +1. Configure your publishing source to publish from a branch of your choosing. For more information, see "[AUTOTITLE](/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-from-a-branch)." +1. 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](/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-from-a-branch)." + +{% endif %}