Dash in repo name causes 404 error on deploy to gh-pages

I installed gh pages as a dependency for my create-react-app based free code camp project page here:

http://zenlex.github.io/drummachine. It works just fine now. HOWEVER, 

The repo was originally named drum-machine. Upon running ‘npm run deploy’ I got a 404 error on the gh pages url: http://zenlex.github.io/drum-machine/ 
This is the 3rd react app I had deployed for these projects via these methods and the only difference I could spot in anything I did was the hyphen in the repo name. To test that theory I renamed the repo to remove the hyphen and updated the homepage property in package.json to reflect that change and voila, everything seems copacetic. I did some searching through the forums and the documentation and didn’t see anything declaring that hyphens in repo names/gh-pages url’s were problematic in this context. I’m still relatively new to gitHub, gh-pages, and coding in general but would love to know if this is something I need to avoid in the future or if this is a broader issue I should be aware of as I continue to develop skills. Thanks!  

Hi @zenlex!

There is a known issue where a username that begins or ends with a dash will cause an issue, but that doesn’t sound like what’s going on here:

https://docs.github.com/en/github/working-with-github-pages/troubleshooting-custom-domains-and-github-pages#url-formatting-on-linux

I just tested this by creating my own Pages repo with a hyphen in the name, and the page came up (no 404 error). So I’m not sure if this is a broader issue, but I will keep my eye out for anything similar in the future! In the meantime, I’m glad you were able to work around this by removing the hyphen.

Thanks Tammy, yeah it was weird. Perhaps the republish after renaming triggered some other correction of an error. Thanks for your attention to the matte.r

image002.jpg