It is possible to add Google Ads to a website hosted on GitHub Pages, but there are a few things to keep in mind.
GitHub Pages is a static web hosting service and does not support server-side scripting, which is required for the integration of some ad networks. However, Google Ads can be added to static websites by including the ad code directly into the HTML of the pages.
You will need to create an account on Google AdSense, and create an ad unit and get the ad code. Once you have the ad code, you can add it to the HTML of your website hosted on GitHub Pages.
It’s important to note that Google AdSense terms of service requires you to have a custom domain name to host your ads, so you will need to have a custom domain name for your GitHub Pages site, if you want to use Google Ads.
Additionally, you should make sure that you follow GitHub Pages’ terms of service, which prohibits hosting any content that is illegal, pornographic, or that violates the rights of others, and that you comply with all the rules and policies set by Google Ads.
In summary, it is possible to add Google Ads to a website hosted on GitHub Pages, but it requires custom domain name and you should comply with all the rules set by GitHub and Google Ads.