I could very well be wrong though.
Also, to your specific example, does there exist a Flask app that runs on AWS lambda that can listen for a webhook and then build a static website?
Does there exist code that I can put into Github actions that builds a static website and uploads it to a CDN?
That's basically what I'm looking for.
Of course I could write my own solution or cobble it together with a bunch of moving parts, but my whole point is that I'm looking for an existing package that already does it.
PHP for example used to be a "big patchwork" of seperate files working together, but the right tooling came along to think of it as "a unified system". Same thing with Serverless and the Serverless Framework
https://github.com/marketplace/actions/s3-sync
Shouldn't be too difficult to hook this up to a build command for hugo, jekyll, or whichever static site generator you'd prefer. But this gets away from the self-hosted part of what you were saying a bit.