Is important to keep the website files private?

I was trying to publish a site with GitHub Pages in a private repository but I have the free plan, so I was thinking about creating a public repository to publish my site, but are there any consequences?

For example, I know that everyone can see the site’s html and that stuff, so I think that wouldn’t matter if that code is available for public, but are there other things to worry?

It’s not generally matter unless you post some big complex stuff. Like generally GitHub pages are used to showoff the souce code or just personal portfolio. Both are public like. In public repo souce code is public and you use it to show the app running live.
But if you trying to host a corporate website then I think you need to worry about this. Anyone can manipulate you source code.