Why is only the readme file being published to github pages?
What is your repo that feeds the the GitHub page?
What is your GitHub page link?
The repo: https://github.com/HaithamCa/Note-Keeper
Github page link: https://haithamca.github.io/Note-Keeper/
As far as I know, GitHub Pages looks specifically for an
index.html file in the root directory of the project. If it cannot find one, it will not deploy the page correctly.
How to add the
index.html to the root?.
Currently it’s in the
public folder. The root directory is the base folder (where your
README.md is). I would try moving the
index.html file there - you’ll need to update your imports (like the CSS and JS links) though.
I followed these steps https://docs.github.com/en/github/managing-files-in-a-repository/moving-a-file-to-a-new-location
but unfortunately still the same result
Why have you named the file
Sorry, That is my bad.
I fixed it but now it’s not working at all although I changed the path in
index.html to the
index.js but now not working at all.
Also, I am tried to deploy it into
netlify but the result is
Site deploy failed.
You are still are having issues with your references being incorrect. On line 13 of your index.html your path is incorrect.
I changed it but still not working
Oh, wait, this is a React app?
That takes a bit of a different process for deploying to GitHub pages, as React files need to be built/processed into standard JS.
I can not find built/processed. sorry I am new in react that why I am asking questions like this.
Are you using create-react-app? If so and you have Netlify configured correctly to watch your GitHub project folder, then you just need to login to Netlify and click on Site Settings…Build & deploy. You will see Build settings on the right side of the page. Click Edit settings and fill out the fields as below:
I think they are hosting directly on GitHub pages.
I’m also not seeing a
package.json in your repository, @HaithamCa… What I am seeing is the readme says “Created with CodeSandbox”. I haven’t used CodeSandbox, myself, but I would be willing to guess that it works a lot like CodePen and handles a bunch of configuration for you in the background.
Did you copy your code files directly from CodeSandbox into your repository? If so, there are some essential pieces you are missing for deploying this to GitHub pages. @RandellDawson mentioned Netlify as a hosting option - this is very much a viable choice, though I believe you’d still be missing some steps (like the
package.json to tell Netlify what to run on the build step?).