# Github website published

**URL:** <https://forum.freecodecamp.org/t/github-website-published/421193>\
**Category:** General\
**Created:** [September 17, 2020, 1:02am UTC](https://forum.freecodecamp.org/t/github-website-published/421193 "2020-09-17T01:02:33Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![HaithamCa](https://avatars.discourse-cdn.com/v4/letter/h/278dde/32.png) [@HaithamCa](https://forum.freecodecamp.org/u/HaithamCa)\
**Post date:** [September 17, 2020, 1:02am UTC](https://forum.freecodecamp.org/t/github-website-published/421193/1 "2020-09-17T01:02:33Z")

</div>

Why is only the readme file being published to github pages?

---

<div class="post-metadata">

**Author:** ![HaithamCa](https://avatars.discourse-cdn.com/v4/letter/h/278dde/32.png) [@HaithamCa](https://forum.freecodecamp.org/u/HaithamCa)\
**Post date:** [September 17, 2020, 1:47am UTC](https://forum.freecodecamp.org/t/github-website-published/421193/3 "2020-09-17T01:47:46Z")

</div>

The repo: [https://github.com/HaithamCa/Note-Keeper](https://github.com/HaithamCa/Note-Keeper)

Github page link: [https://haithamca.github.io/Note-Keeper/](https://haithamca.github.io/Note-Keeper/)

---

<div class="post-metadata">

**Author:** ![Naomi](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/naomi/32/422181_2.png) [@Naomi](https://forum.freecodecamp.org/u/Naomi)\
**Post date:** [September 17, 2020, 2:13am UTC](https://forum.freecodecamp.org/t/github-website-published/421193/4 "2020-09-17T02:13:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![HaithamCa](https://avatars.discourse-cdn.com/v4/letter/h/278dde/32.png) [@HaithamCa](https://forum.freecodecamp.org/u/HaithamCa)\
**Post date:** [September 17, 2020, 2:24am UTC](https://forum.freecodecamp.org/t/github-website-published/421193/5 "2020-09-17T02:24:47Z")

</div>

How to add the `index.html` to the root?.

---

<div class="post-metadata">

**Author:** ![Naomi](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/naomi/32/422181_2.png) [@Naomi](https://forum.freecodecamp.org/u/Naomi)\
**Post date:** [September 17, 2020, 2:28am UTC](https://forum.freecodecamp.org/t/github-website-published/421193/6 "2020-09-17T02:28:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![HaithamCa](https://avatars.discourse-cdn.com/v4/letter/h/278dde/32.png) [@HaithamCa](https://forum.freecodecamp.org/u/HaithamCa)\
**Post date:** [September 17, 2020, 3:11am UTC](https://forum.freecodecamp.org/t/github-website-published/421193/7 "2020-09-17T03:11:37Z")

</div>

I followed these steps [https://docs.github.com/en/github/managing-files-in-a-repository/moving-a-file-to-a-new-location](https://docs.github.com/en/github/managing-files-in-a-repository/moving-a-file-to-a-new-location)  
but unfortunately still the same result

---

<div class="post-metadata">

**Author:** ![Naomi](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/naomi/32/422181_2.png) [@Naomi](https://forum.freecodecamp.org/u/Naomi)\
**Post date:** [September 17, 2020, 3:40am UTC](https://forum.freecodecamp.org/t/github-website-published/421193/8 "2020-09-17T03:40:17Z")

</div>

Why have you named the file `..index.html`?

---

<div class="post-metadata">

**Author:** ![HaithamCa](https://avatars.discourse-cdn.com/v4/letter/h/278dde/32.png) [@HaithamCa](https://forum.freecodecamp.org/u/HaithamCa)\
**Post date:** [September 17, 2020, 12:08pm UTC](https://forum.freecodecamp.org/t/github-website-published/421193/9 "2020-09-17T12:08:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![HaithamCa](https://avatars.discourse-cdn.com/v4/letter/h/278dde/32.png) [@HaithamCa](https://forum.freecodecamp.org/u/HaithamCa)\
**Post date:** [September 17, 2020, 2:42pm UTC](https://forum.freecodecamp.org/t/github-website-published/421193/10 "2020-09-17T14:42:52Z")

</div>

Also, I am tried to deploy it into `netlify` but the result is `Site deploy failed`.

---

<div class="post-metadata">

**Author:** ![JeremyLT](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jeremylt/32/291894_2.png) [@JeremyLT](https://forum.freecodecamp.org/u/JeremyLT)\
**Post date:** [September 17, 2020, 2:46pm UTC](https://forum.freecodecamp.org/t/github-website-published/421193/11 "2020-09-17T14:46:34Z")

</div>

You are still are having issues with your references being incorrect. On line 13 of your index.html your path is incorrect.

---

<div class="post-metadata">

**Author:** ![HaithamCa](https://avatars.discourse-cdn.com/v4/letter/h/278dde/32.png) [@HaithamCa](https://forum.freecodecamp.org/u/HaithamCa)\
**Post date:** [September 17, 2020, 2:50pm UTC](https://forum.freecodecamp.org/t/github-website-published/421193/12 "2020-09-17T14:50:22Z")

</div>

I changed it but still not working `src="./src/index.js"`

---

<div class="post-metadata">

**Author:** ![Naomi](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/naomi/32/422181_2.png) [@Naomi](https://forum.freecodecamp.org/u/Naomi)\
**Post date:** [September 17, 2020, 2:54pm UTC](https://forum.freecodecamp.org/t/github-website-published/421193/13 "2020-09-17T14:54:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![HaithamCa](https://avatars.discourse-cdn.com/v4/letter/h/278dde/32.png) [@HaithamCa](https://forum.freecodecamp.org/u/HaithamCa)\
**Post date:** [September 17, 2020, 3:30pm UTC](https://forum.freecodecamp.org/t/github-website-published/421193/14 "2020-09-17T15:30:49Z")

</div>

I can not find built/processed. sorry I am new in react that why I am asking questions like this.

---

<div class="post-metadata">

**Author:** ![Naomi](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/naomi/32/422181_2.png) [@Naomi](https://forum.freecodecamp.org/u/Naomi)\
**Post date:** [September 17, 2020, 4:13pm UTC](https://forum.freecodecamp.org/t/github-website-published/421193/16 "2020-09-17T16:13:32Z")

</div>

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. @camperextraordinaire 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?).

---

<div class="post-metadata">

**Author:** ![HaithamCa](https://avatars.discourse-cdn.com/v4/letter/h/278dde/32.png) [@HaithamCa](https://forum.freecodecamp.org/u/HaithamCa)\
**Post date:** [September 17, 2020, 6:45pm UTC](https://forum.freecodecamp.org/t/github-website-published/421193/17 "2020-09-17T18:45:37Z")

</div>

Here is the Error [https://app.netlify.com/sites/clever-kirch-9f4788/deploys/5f637f46262798260b2a0c7a](https://app.netlify.com/sites/clever-kirch-9f4788/deploys/5f637f46262798260b2a0c7a)

---

<div class="post-metadata">

**Author:** ![nibble](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/nibble/32/123681_2.png) [@nibble](https://forum.freecodecamp.org/u/nibble)\
**Post date:** [September 17, 2020, 6:55pm UTC](https://forum.freecodecamp.org/t/github-website-published/421193/18 "2020-09-17T18:55:30Z")

</div>

Hi @HaithamCa, from my experience deploying to netlify, if react emits warnings, the build will fail because netlify interprets them as errors . Instead of `npm run build`, try  
`CI='' npm run build`. You can also read through [this question which is on similar issue](https://community.netlify.com/t/netlify-not-building-command-failed-with-exit-code-1-npm-run-build/16999/17).

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [June 1, 2021, 6:39pm UTC](https://forum.freecodecamp.org/t/github-website-published/421193/19 "2021-06-01T18:39:00Z")

</div>

Closed on June 1, 2021, 6:39pm UTC


