Gh pages uses old source that no longer exists

I have just one master branch. I commit, push and pull changes. But my gh-page hasn’t been updating for months. source - branch: master, /root. In fairness I have to say that page’s title was updated. Oh yeah. GitHub - thirtythreeboas/store I can’t find any solution. Would be very grateful for any help. Thanks.

p.s. When I checked source in DevTools, I found out that it uses some old files that no longer exists. And I have no idea why it doesn’t work.

you don’t have the gh-pages right now,

or are you referring to the public folder in master as the gh-pages?

because I see here the last commit was 2 months ago,

if this is the case, this will not be updated automatically because it’s a folder inside master, you should update that manually,

Hi! Thanks for your reply!
If I am not mistaken I don’t need to have gh-pages branch, I can activate gh-pages in settings of my repo, correct me if I’m wrong. And I don’t understand the role of public folder, would you explain it to me? My components have been updating and I thought that it is enough.

this is your website hosted on GitHub Pages from master,

this is your website hosted on GitHub Pages from public folder, it’s blank

https://thirtythreeboas.github.io/store/public/

this was the one you were referring too, that was not updated automatically,

yup, your website is already working, it’s being hosted from master so you don’t need gh-pages anymore,

there are three sources to host your site, master (now it’s main), gh-pages and docs

you can simply delete the public folder, you don’t need that unless you have other reasons to have that,

So the problem is that my main source is master, but it deploys files that don’t exist. They don’t exist on local machine and repo as well.

This is gh pages

These files were either deleted, renamed or changed etc. And I don’t understand why it refers to them, because there are no such files in my repo anymore.

And it’s done with npm start

There are new components, fixed markup, footer and so on, and all these changes were committed and pushed long ago. But when gh-pages deploy it, it doesn’t detect any changes.

I am very grateful for your help but I still don’t get it.

you don’t have gh-pages, your site is being hosted on master branch, the default branch, it exists, it is the master branch, the changes you made in index.html at your master branch is the one that will reflect your website,

of course, it’s a different thing when you are referring to local machine and repo, any changes you made on your local machine that you did not push on master will not be reflected

as you can see, on your screenshot, the Source is master at root, when you update that, your website will be updated too, forget gh-pages because you are confused,

most important now is that your website is working, when you need to update your site, you need to update the files on your master repo, wait for several minutes, and it will change,

Yes, of course you’re right. But as I mentioned before committed and pushed changes to master, I updated master many times, and I waited and nothing happened. And it’s been happening for months

I commit and push every change

Master is completely different from what we see in devtools when it’s hosted.
Compare mainContent files with what is going on in devtools on screen above.

One more time I want to say thanks for your help.

what? you have another folder? You are really that confused in terms of deploying your website

it will not reflect on your master branch unless you tell the index.html to do that or any other scripting to automate your changes

It is not another, it is the only one I have

what you are posting is in src folder, don’t think that will automate things for you, that’s the problem, really,

so you think, it will update automatically, but it’s not, that’s the problem, right?

GitHub Pages only accepts pure HTML, CSS and JavaScript,

Ok, now I got it, so now I have no idea on how to deal with index.html, because the only answer and I found before was to wait a little bit and things would be done. But that’s not the case. So, can you advice me something?

what happened to your website? this is the README.md already not the index.html, you’ve already deleted it and updated the one inside public folder, which still returns blank,

well, i’ll fix it a little bit later

1 Like

From what I can tell, you’re using react.js to generate a static site. Stuff in the src folder is the “source”, not the website itself. So changing the source will not update the website until you also re-build the website assets from the source.

It looks like if you run npm run build from the root of the project (same directory as package.json), it should produce the required plain HTML/CSS/JS assets (index.html, various files under static directory, etc.)