Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hatscripts.github.io down :-( #20

Closed
ottsch opened this issue Feb 25, 2021 · 8 comments
Closed

hatscripts.github.io down :-( #20

ottsch opened this issue Feb 25, 2021 · 8 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ottsch
Copy link

ottsch commented Feb 25, 2021

No description provided.

@waldyrious
Copy link
Collaborator

Looks like the default branch was recently renamed from master to main. It's possible that GitHub Pages is set up in this repo to use the master 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.

@tnovau
Copy link
Collaborator

tnovau commented Feb 25, 2021

@HatScripts I have tried to create two branches: master and gh-pages but it didn't the trick.

@bttruc
Copy link

bttruc commented Feb 26, 2021

You can the link to get flags
https://raw.githubusercontent.com/HatScripts/circle-flags/main/flags/us.svg

@HatScripts
Copy link
Owner

HatScripts commented Feb 26, 2021

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!

@HatScripts HatScripts added bug Something isn't working help wanted Extra attention is needed labels Feb 26, 2021
@waldyrious
Copy link
Collaborator

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 mastermain 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... 🤔

@HatScripts
Copy link
Owner

Can't you make gh-pages the default branch for the repo? That way you could also delete main.

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 the mastermain renaming didn't automatically adjust the GitHub Pages configuration, since github/renaming § Renaming existing branches says:

You are right, the mastermain 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.

@waldyrious
Copy link
Collaborator

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants
@ottsch @waldyrious @HatScripts @tnovau @bttruc and others