My repo: https://github.com/shoegazzz/simple-trello-clone When following a link https://shoegazzz.github.io/simple-trello-clone/ :
404 File not found The site configured at this address does not contain the requested file. If this is your site, make sure that the filename case matches the URL. For root URLs (like http://example.com/) you must provide an index.html file. Read the full documentation for more information about using GitHub Pages.
I read the documentation, watched videos and discussions on the topic, renamed the repository to the username, but it still does not work. Tell me what should be done here?
CodePudding user response:
first things first: please leverage the usage of the .gitignore file (in the root directory of your repository). You can copy-paste the content provided in this file: https://github.com/github/gitignore/blob/main/Node.gitignore into your .gitignore file. This will ignore the node_modules directory from getting staged and ultimately from getting pushed into the repository.
Now, the problem you described occures when there is no information for GitHub Pages. GitHub Pages is searching for an index.html which isn't there, as by default GitHub Pages is watching the root directory of your repository.
Please have a look at GitHub Actions to Deploy your project to GitHub Pages. This is the best source I could find in a short matter of time: https://github.com/gitname/react-gh-pages
If you have any follow-up questions, feel free to ask.
TL;DR: You need to provide the built static-website content for GitHub Pages to work with.