Closed ottsch closed 3 years ago
@HatScripts I have tried to create two branches: master and gh-pages but it didn't the trick.
You can the link to get flags https://raw.githubusercontent.com/HatScripts/circle-flags/main/flags/us.svg
Hey all, I'm really sorry about this. I should have confirmed that hatscripts.github.io/circle-flags was still up and running after renaming the default branch to main
.
It should be working again now, but please let me know if you experience any further issues. The fix required setting the GitHub Pages source branch in the repo settings to the gh-pages
branch that @tnovau created (Thanks @tnovau!). Setting it to master
also worked, but for some reason not main
. I have since deleted the master
branch.
If anyone has any insights into how to get it working without needing both the main
and gh-pages
branches, it would be much appreciated. Thanks!
If anyone has any insights into how to get it working without needing both the main and gh-pages branches, it would be much appreciated. Thanks!
Can't you make gh-pages
the default branch for the repo? That way you could also delete main
.
That said, it sounds quite odd that main
is not showing up as a possible source for GitHub Pages. According to github/renaming § What's already changed and the blog post linked from there, it should be possible to set any branch as the source for GitHub pages. I just tested on a repository where I have access to the settings, and all existing branches show up in the GitHub Pages dropdown.
Furthermore, it sounds odd that the master
→ main
renaming didn't automatically adjust the GitHub Pages configuration, since github/renaming § Renaming existing branches says:
Renaming a branch will (...) update the branch used to build GitHub Pages, if applicable
So it sounds like a bug or misconfiguration of some sort... 🤔
Can't you make
gh-pages
the default branch for the repo? That way you could also deletemain
.
Oh yes you are correct. I just followed your advice and everything works!
That said, it sounds quite odd that
main
is not showing up as a possible source for GitHub Pages. According to github/renaming § What's already changed and the blog post linked from there, it should be possible to set any branch as the source for GitHub pages. I just tested on a repository where I have access to the settings, and all existing branches show up in the GitHub Pages dropdown. Furthermore, it sounds odd that themaster
→main
renaming didn't automatically adjust the GitHub Pages configuration, since github/renaming § Renaming existing branches says:
You are right, the master
→ main
renaming did automatically set main
to be the GitHub Pages source branch. But for some reason, when main
was set as the source branch, hatscripts.github.io/circle-flags/ went down. I tried setting the source branch back to master
, which worked, and hatscripts.github.io/circle-flags/ was back up. I set it back to main
and it was down again. But gh-pages
works. 🤔
I tried seeing if there's some relevant Jekyll configuration option, but couldn't find anything.
when main was set as the source branch, hatscripts.github.io/circle-flags/ went down
No idea why that'd happen. My best guess is that it took GitHub a while to regenerate the website from the "new" sources. (Did you check the site immediately after renaming the branch? Sometimes GitHub Pages takes a few minutes to rebuild the site when settings change.) If that was not the case, perhaps some sort of dummy change to the sources would be needed to trigger a new build.
Anyway, glad things are back up :)
Looks like the default branch was recently renamed from
master
tomain
. It's possible that GitHub Pages is set up in this repo to use themaster
branch, and that wasn't updated when the branch was changed. I don't have the access to confirm that, but that's my best guess as to what might be the issue.