Skip to main content

Unpublishing a Pages site

Who can use this feature?

People with admin or maintainer permissions for a repository can unpublish a Pages site.

Pages is available in public repositories with Free and Free for organizations, and in public and private repositories with Pro, Team, Enterprise Cloud, and Enterprise Server. For more information, see ’s plans.

Pages now uses Actions to execute the Jekyll build. When using a branch as the source of your build, Actions must be enabled in your repository if you want to use the built-in Jekyll workflow. Alternatively, if Actions is unavailable or disabled, adding a .nojekyll file to the root of your source branch will bypass the Jekyll build process and deploy the content directly. For more information on enabling Actions, see Managing Actions settings for a repository.

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 Pages site.

  1. On , navigate to the main page of the repository.
  2. Under Pages, next to the Your site is live at message, click .
  3. In the menu that appears, select Unpublish site.
    Screenshot of GitHub Pages settings with the URL of a live site. On the right under a kebab icon, the "Unpublish site" option is outlined in orange.

Unpublishing your Pages site removes your current deployment. To make your site available again, you can create a new deployment.

A successful workflow run in the repository for your site will create a new deployment. Trigger a workflow run to redeploy your site.

  1. Configure your publishing source to publish from a branch of your choosing. For more information, see Configuring a publishing source for your Pages site.
  2. Commit to your publishing source to create a new deployment.