# Problem with site on github

**URL:** <https://discourse.gohugo.io/t/problem-with-site-on-github/54419>\
**Category:** support\
**Tags:** git\
**Created:** [April 17, 2025, 7:06am UTC](https://discourse.gohugo.io/t/problem-with-site-on-github/54419 "2025-04-17T07:06:35Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![anyatomik](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/anyatomik/32/24380_2.png) [@anyatomik](https://discourse.gohugo.io/u/anyatomik)\
**Post date:** [April 17, 2025, 7:06am UTC](https://discourse.gohugo.io/t/problem-with-site-on-github/54419/1 "2025-04-17T07:06:35Z")

</div>

when i tried to load my site on github pages everything does not work in it when open, when I try to download from localhost everything is fine, but not public

[GitHub - anyatomik/AstraLearn: site for astra-learn project](https://github.com/anyatomik/AstraLearn) - my site on github

[Astra-learn](https://anyatomik.github.io/AstraLearn/) - my site (There should be content here and it should be normal to go to pages and change language, but there’s nothing here)

I can’t even imagine how to solve this and why is this happening

---

<div class="post-metadata">

**Author:** ![irkode](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/irkode/32/26135_2.png) [@irkode](https://discourse.gohugo.io/u/irkode)\
**Post date:** [April 17, 2025, 7:27am UTC](https://discourse.gohugo.io/t/problem-with-site-on-github/54419/2 "2025-04-17T07:27:39Z")

</div>

two problems:

- you commit your public folder to the repo, If building in a Ci/CD (gitub workflow) it’s not agood idea as the content is generated by the workflow and old stuff is not automatically deleted.

- you are building with a standard Github pages action workflow that uses Jekyll under the hood

---

<div class="post-metadata">

**Author:** ![anyatomik](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/anyatomik/32/24380_2.png) [@anyatomik](https://discourse.gohugo.io/u/anyatomik)\
**Post date:** [April 17, 2025, 8:03am UTC](https://discourse.gohugo.io/t/problem-with-site-on-github/54419/3 "2025-04-17T08:03:31Z")

</div>

when i tryed to commit hugo.yaml i had an error

HUGO\_VERSION: 0.146.5  
HUGO\_ENVIRONMENT: production  
TZ: America/Los\_Angeles  
GITHUB\_PAGES: true  
INPUT\_PATH: ./public  
Archive artifact  
tar: public: Cannot open: No such file or directory  
tar: Error is not recoverable: exiting now  
Error: Process completed with exit code 2.

---

<div class="post-metadata">

**Author:** ![irkode](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/irkode/32/26135_2.png) [@irkode](https://discourse.gohugo.io/u/irkode)\
**Post date:** [April 17, 2025, 8:06am UTC](https://discourse.gohugo.io/t/problem-with-site-on-github/54419/4 "2025-04-17T08:06:23Z")

</div>

the old workflow is atill there and active

---

<div class="post-metadata">

**Author:** ![anyatomik](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/anyatomik/32/24380_2.png) [@anyatomik](https://discourse.gohugo.io/u/anyatomik)\
**Post date:** [April 17, 2025, 8:15am UTC](https://discourse.gohugo.io/t/problem-with-site-on-github/54419/5 "2025-04-17T08:15:05Z")

</div>

how could i deactivate it?

---

<div class="post-metadata">

**Author:** ![irkode](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/irkode/32/26135_2.png) [@irkode](https://discourse.gohugo.io/u/irkode)\
**Post date:** [April 17, 2025, 8:23am UTC](https://discourse.gohugo.io/t/problem-with-site-on-github/54419/6 "2025-04-17T08:23:22Z")

</div>

there should be an option on your GitHub Actioon settings

sometimes its necessary to unpublish the site in the Github UI and then reactivate it

i just cloned your repo and get the same error with the workflow. … investigating

---

<div class="post-metadata">

**Author:** ![irkode](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/irkode/32/26135_2.png) [@irkode](https://discourse.gohugo.io/u/irkode)\
**Post date:** [April 17, 2025, 8:55am UTC](https://discourse.gohugo.io/t/problem-with-site-on-github/54419/7 "2025-04-17T08:55:16Z")

</div>

You have that in your hugo.toml:

```auto
publishDir = "docs"

```

so change your WF to use `./docs` one instead of `./public`

if you do not have something after that needs thet `docs`, I would recommend to just go with the defaults and remove that setting

just commented that line and all went fine

---

<div class="post-metadata">

**Author:** ![irkode](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/irkode/32/26135_2.png) [@irkode](https://discourse.gohugo.io/u/irkode)\
**Post date:** [April 17, 2025, 11:58am UTC](https://discourse.gohugo.io/t/problem-with-site-on-github/54419/8 "2025-04-17T11:58:28Z")

</div>

supose you now also want to remove the docs folder from your repo

---

<div class="post-metadata">

**Author:** ![anyatomik](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/anyatomik/32/24380_2.png) [@anyatomik](https://discourse.gohugo.io/u/anyatomik)\
**Post date:** [April 17, 2025, 11:59am UTC](https://discourse.gohugo.io/t/problem-with-site-on-github/54419/9 "2025-04-17T11:59:41Z")

</div>

Thank you so much! 😁  
The error really disappeared, but for some reason there is still no content on the main page, and the pages are inaccessible

---

<div class="post-metadata">

**Author:** ![irkode](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/irkode/32/26135_2.png) [@irkode](https://discourse.gohugo.io/u/irkode)\
**Post date:** [April 17, 2025, 12:04pm UTC](https://discourse.gohugo.io/t/problem-with-site-on-github/54419/10 "2025-04-17T12:04:47Z")

</div>

mmh, maybe related to files organization with the theme.

i was able to get about page in en and ru.

your \_index files in content root are in fact empty…

this also should be the case in local development.

build problem solved

i would consider that a new topic in case you cannot get it to work.

---

<div class="post-metadata">

**Author:** ![anyatomik](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/anyatomik/32/24380_2.png) [@anyatomik](https://discourse.gohugo.io/u/anyatomik)\
**Post date:** [April 17, 2025, 12:30pm UTC](https://discourse.gohugo.io/t/problem-with-site-on-github/54419/12 "2025-04-17T12:30:37Z")

</div>

Thanks again. But since the content \_index is empty, how then does the site run through the hugo server?

---

<div class="post-metadata">

**Author:** ![irkode](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/irkode/32/26135_2.png) [@irkode](https://discourse.gohugo.io/u/irkode)\
**Post date:** [April 17, 2025, 12:42pm UTC](https://discourse.gohugo.io/t/problem-with-site-on-github/54419/13 "2025-04-17T12:42:24Z")

</div>

ok. not empty at all but no content. They contain a frontmatter header. enough to be a valid page.

would be better to set post 2 as solution…the rest is lets call it noise 😉

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [April 24, 2025, 4:10am UTC](https://discourse.gohugo.io/t/problem-with-site-on-github/54419/14 "2025-04-24T04:10:37Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
