Skip to content

Commit d344564

Browse files
authored
Merge pull request #25717 from github/repo-sync
repo sync
2 parents 9800453 + f74fe2b commit d344564

File tree

3 files changed

+66
-4
lines changed

3 files changed

+66
-4
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: Deleting a GitHub Pages site
3+
intro: 'You can delete a {% data variables.product.prodname_pages %} site.'
4+
product: '{% data reusables.gated-features.pages %}'
5+
permissions: 'People with admin or maintainer permissions for a repository can delete a {% data variables.product.prodname_pages %} site.'
6+
versions:
7+
fpt: '*'
8+
ghes: '*'
9+
ghae: '*'
10+
ghec: '*'
11+
topics:
12+
- Pages
13+
shortTitle: Delete a GitHub Pages site
14+
---
15+
16+
## Deleting your site
17+
18+
You can delete your site in two ways:
19+
- Delete the repository. For more information, see "[AUTOTITLE](/repositories/creating-and-managing-repositories/deleting-a-repository)."
20+
- 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.
21+
22+
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)."
23+
## Deleting your site by changing the source
24+
25+
{% data reusables.pages.navigate-site-repo %}
26+
{% data reusables.repositories.sidebar-settings %}
27+
{% data reusables.pages.sidebar-pages %}
28+
1. Under "Build and deployment", under "Source", select **Deploy from a branch** even if the site is currently using {% data variables.product.prodname_actions %}.
29+
1. Under "Build and deployment", use the branch dropdown menu and select `None` as the publishing source.
30+
![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)
31+
1. Click **Save**.

content/pages/getting-started-with-github-pages/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ children:
1818
- /about-github-pages
1919
- /creating-a-github-pages-site
2020
- /configuring-a-publishing-source-for-your-github-pages-site
21+
- /deleting-a-github-pages-site
22+
- /unpublishing-a-github-pages-site
2123
- /changing-the-visibility-of-your-github-pages-site
2224
- /creating-a-custom-404-page-for-your-github-pages-site
2325
- /securing-your-github-pages-site-with-https
2426
- /using-submodules-with-github-pages
25-
- /unpublishing-a-github-pages-site
2627
shortTitle: Get started
2728
---
2829

content/pages/getting-started-with-github-pages/unpublishing-a-github-pages-site.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Unpublishing a GitHub Pages site
3-
intro: 'You can unpublish your {% data variables.product.prodname_pages %} site so that the site is no longer available.'
3+
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.'
44
redirect_from:
55
- /articles/how-do-i-unpublish-a-project-page
66
- /articles/unpublishing-a-project-page
@@ -20,9 +20,11 @@ topics:
2020
shortTitle: Unpublish Pages site
2121
---
2222

23-
{% ifversion pages-custom-workflow %}
23+
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.
24+
25+
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)."
2426

25-
When you unpublish your site, the site will no longer be available. Any existing repository settings or content will not be affected.
27+
{% ifversion pages-custom-workflow %}
2628

2729
{% data reusables.repositories.navigate-to-repo %}
2830
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
4951
{% data reusables.pages.update_your_dns_settings %}
5052

5153
{% endif %}
54+
55+
## Re-enabling a site that has been unpublished
56+
57+
Unpublishing your {% data variables.product.prodname_pages %} site removes your current deployment. To make your site available again, you can create a new deployment.
58+
59+
{% ifversion pages-custom-workflow %}
60+
61+
### Re-enable using {% data variables.product.prodname_actions %}
62+
63+
A successful workflow run in the repository for your site will create a new deployment. Trigger a workflow run to redeploy your site.
64+
65+
### Re-enabling your site when publishing from a branch
66+
67+
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)."
68+
1. Commit to your publishing source to create a new deployment.
69+
70+
{% else %}
71+
72+
### Re-enabling a project site
73+
74+
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)."
75+
1. Commit to your publishing source to create a new deployment.
76+
77+
### Re-enabling a user or organization site
78+
79+
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)."
80+
81+
{% endif %}

0 commit comments

Comments
 (0)