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?
Add a comment
|
2 Answers
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.
1 Comment
j3ff
I was sceptical but I tried to do a "fake" commit (adding spaces) and redeploying and it worked! Thanks for the insight
Make sure you have declared a proper
!DOCTYPEin your index file.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
Steverino
<!DOCTYPE html> is set correctly at the top of the file. How much time is "a while"?AndrewL64
DNS usually resolves within 24hours or less. What do you get on the browser console when opening the link without the index.html filepath?
Steverino
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.
AndrewL64
Oh ok. Interesting. You should open a new issue thread on GitHub with regards to this. Really weird.