4

I have a gh-pages branch in my repository. My gh-pages branch and master branch are in an identical state. Both have index.html included in them. The settings page for my repository says Your site is published at https://[me].github.io/[appName]/. When I visit that URL, I receive a 404 error. When I visit https://[me].github.io/[appName]/index.html (with the specific asset index.html specified explicity) then it works, meaning the expected assets are located where expected, and function correctly. How can I get GH Pages to pick up my index.html file?

0

2 Answers 2

4

The problem resolved with a subsequent code change and push to origin. I don't know why, but after performing a bug fix and pushing the code via git push origin gh-pages everything showed up on all machines in all regions in all browsers that were previously not working.

Sign up to request clarification or add additional context in comments.

1 Comment

I was sceptical but I tried to do a "fake" commit (adding spaces) and redeploying and it worked! Thanks for the insight
0
  1. Make sure you have declared a proper !DOCTYPE in your index file.

  2. If you had just added the file, then give it some time and let github detect the file. https://[me].github.io/[appName]/ should work after a while.

4 Comments

<!DOCTYPE html> is set correctly at the top of the file. How much time is "a while"?
DNS usually resolves within 24hours or less. What do you get on the browser console when opening the link without the index.html filepath?
It started working after I pushed a subsequent code change so I can't check the browser. It was suggested by a coworker that sometimes a gh-pages deploy fails silently and will not retry until you push another code change. This seems to have worked, though it isn't a satisfying way of "fixing" the problem if there was no problem with the code itself.
Oh ok. Interesting. You should open a new issue thread on GitHub with regards to this. Really weird.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.