# 404 after deploying to Github Pages

**URL:** <https://discourse.gohugo.io/t/404-after-deploying-to-github-pages/34915>\
**Category:** support\
**Created:** [September 28, 2021, 1:15pm UTC](https://discourse.gohugo.io/t/404-after-deploying-to-github-pages/34915 "2021-09-28T13:15:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mattt](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/mattt/32/15292_2.png) [@Mattt](https://discourse.gohugo.io/u/Mattt)\
**Post date:** [September 28, 2021, 1:15pm UTC](https://discourse.gohugo.io/t/404-after-deploying-to-github-pages/34915/1 "2021-09-28T13:15:12Z")

</div>

As the title suggests, I’m presented with a 404 when trying to access my Hugo site on Github pages.

The Hugo quickstart ends with running “hugo -D” which generates the directories “public/” and “resources/” - am I supposed to commit those to my repository and push them to github? Isn’t the github action supposed to build hugo and create those directories with my content?

After the github action executes successfully, should I expect to see those directories when browsing my repo on github?

---

<div class="post-metadata">

**Author:** ![Mehedi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/mehedi/32/12392_2.png) [@Mehedi](https://discourse.gohugo.io/u/Mehedi)\
**Post date:** [September 29, 2021, 5:16am UTC](https://discourse.gohugo.io/t/404-after-deploying-to-github-pages/34915/2 "2021-09-29T05:16:06Z")

</div>

Hello @Mattt

For Github pages, you need to set the `baseURL` first. then generate your public file, and push it into another GitHub repository, and then you can config this new repository for the GitHub page.
