Unfortunately I don't think there's really an answer to that conundrum that doesn't involve just spinning up your own git server and accepting all the operational overhead that comes with it.
Hmm all that operational overhead... Of an ssh server? If you literally just want a place to push some code, then that really isn't that hard.
In case anybody is interested, having a bare git repo on a server is as easy as:
# locally
ssh [email protected]
# server
mkdir repo.git
cd repo.git
git --bare init
# locally
git remote add origin ssh://[email protected]/home/git/repo.git
git push origin master
P.S. I know it does not have the same features as githubExactly, it's super easy. You only need the first part of this guide https://www.youtube.com/watch?v=40SnEd1RWUU
But they don't literally just want a place to push some code. The problem statement included "if GitHub Pages is why you used GitHub".
> ...that really isn't that hard.
Until the AI scrapers[1] come for you at 5k requests per second and you're doing operations in hard-mode.
1. Most forges have http pages for discoverability. I suppose one could hypothetically setup an ssh-only forge and statically generate a html site periodically, but this is already advanced ops for the average Github user
Lots and lots of programmers have very little understanding and especially operation knowledge of how to host a public service. You can be an extreme graphics programmer and not know the web stack at all.
And no, its not that hard once you learn. Except, now its a never ending chore when it was an appliance. Instead of a car you have a project car.