Hey @louisabraham, welcome to the GitHub Support Community! I see this post is very old at this point, but wanted to answer it anyway in case someone else stumbles upon this with a similar problem.
Pages sites have a built time of up to 10 minutes, and it can take up to 10 minutes for them to deploy across our CDN too. If you’ve got a large site then this can mean you’ll need to wait a little longer after pushing your changes to see your live site.
If your site is taking a long time to build then you might want to speed it up by disabling Jekyll if you’re not using it. You can do this by creating a
.nojekyll file in the root of your site’s publishing source.
On top of that, if you visit your site before it’s finished deploying and get a 404 page, this page can also be cached. I think the cache time is around 5-10 minutes but I’m not sure whether it’s a little longer than that.
You can bust the cache and see through it by adding a URL parameter on the end of your site’s URL, e.g.
https://username.github.io/file.js?param. (Be aware that this will probably then also be cached so you’ll need to change the parameter each time you check).