Today it appears you have two options
1) Anubis or similar
2) Accept that 90-95% of your traffic is LLM scrapers fetching every file for every commit for every repo etc etc. There's some comments above with specific lists.
The secret 3rd option is write some code.