You can run PHP in GitHub with the GitHub Actions to generate a static HTML site hosted in GitHub Pages.
So you can edit your HTML push and have a simple script to clean it before publishing it.
You can copy my blog is very simple and is generated with PHP