Browse Source

Add note about GH Pages redeploy

I changed `master` to `main` on a `username.github.io` repo and the site went to 404. I assume it was DNS related and would solve itself and went to sleep. The site was still down in the morning, so I edited the `index.html` to add a single character change and merged to trigger a deploy. This fixed it. I'm shocked that GitHub doesn't just perform a one-time deploy of GH Pages after a branch name. Especially in a scenario where you're going from `master` to `main` on a repo ending in `.github.io`. But really it should just do that anytime the branch used for GH Pages is renamed.
The Jared Wilcurt 3 years ago
parent
commit
4f1df94c5d
1 changed files with 1 additions and 0 deletions
  1. 1 0
      README.md

+ 1 - 0
README.md

@@ -11,6 +11,7 @@ We're making changes to GitHub in a few phases, designed to cause as little disr
 - [We've updated GitHub.com](https://github.blog/changelog/2020-07-17-links-to-deleted-branches-now-redirect-to-the-default-branch/) to redirect links that contain the deleted branch name such as `master` to the corresponding link in the repository's new default branch.
 - [We've updated GitHub Pages](https://github.blog/changelog/2020-07-31-build-and-deploy-github-pages-from-any-branch-beta/) to build and deploy from any branch.
   - Note: publishing to the special `gh-pages` branch will still work the same as it always has, but now you can choose any other branch in your repository as the publishing source.
+  - Note: If a branch used for GitHub Pages is renamed, it will not automatically redeploy your site. You will need to edit a file on that branch after the rename to trigger a new build and deploy. Until then your website will direct to a 404 page.
 - [We've added user, organization, and enterprise settings](https://github.blog/changelog/2020-08-26-set-the-default-branch-for-newly-created-repositories/) to set the default branch name for all newly-created repositories on GitHub.com. We're adding the same settings in the 3.0 release of GitHub Enterprise Server.
   - These settings cover repositories created through [GitHub.com](https://github.com/new) and the [GitHub API](https://developer.github.com/v3/guides/getting-started/#create-a-repository). Git 2.28 added a similar setting to control the default branch used when you run `git init` on the command line. Learn more about the new `init.defaultBranch` setting in [the Git 2.28 blog post](https://github.blog/2020-07-27-highlights-from-git-2-28/#introducing-init-defaultbranch).
   - [GitHub Desktop](https://desktop.github.com/) has introduced a default branch setting for new repositories.