How to host private files on github and link them in public html website? [duplicate]

i made a web game with html, css, javascript and published it in blogger.com but the problem is that anyone can open inspector and copy my code. how to make private files in github, and link them in my html, for example script.js, and so that users will not be able to copy or see the code of my script.js file through inspector, but that the game will still work fine and be public?

i tried to link the github script.js private file with the game logic in it in the html public website game, i didnt expect it to work, and it didnt