Can I solve somehow if I make a web for a headless CMS (like a blog for a headless wordpress) to my website be static (use a webserver like apache2), but every new page, (for example the blog posts) be there automatically when a new post gets added on wordpress, etc?
So currently I'm making tests, I have a VPS, where I want to achieve that when I change anything on wordpress, it triggers an auto build. I solved already that Apache2 gets the content from the dist folder, with virtualconf.
But the automatic build is a thing what I can't figure out.
Also later, I would need something like when I have a change in WP, it auto uploads the content of the dist folder to a simple webhost.
How can achieve theese?