#Auto build/deploy with a headless CMS

27 messages · Page 1 of 1 (latest)

lapis merlin
#

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?

fringe hemlockBOT
#
No-one around right now?

It looks like no-one has responded to your question yet. People might not be available right now or don’t know how to answer your question. Want an answer while you wait? Try asking our experimental bot in #1095492539085230272.

oak verge
#

How do you currently run the build?

lapis merlin
#

npm run build

#

Alias astro build

#

I run it manually when is needed

oak verge
#

You run it manually on your local machine?

lapis merlin
#

Yep

#

We can say

#

I have a VPS for it for now

lapis merlin
#

So

#

@oak verge

#

What I want to achieve that if my client has a regular webhost with wp on it

#

I want to solve that I make the frontend for the wp in astro, like headless-cms, and after when I change something in wp, then the site gets displayed

#

On the webhost i do not have a node instance.

#

Just a regular webhost.

oak verge
#

Right. You would need some kind of Node server somewhere to run the builds.

#

If at all possible, I'd recommend checking out hosts like Netlify or Vercel. They're specialised in this kind of setup where they rebuild the site for you.

#

Not impossible to rebuild it yourself I don't think but quite complex — I personally wouldn't really know how.

lapis merlin
#
  • wp webhooks
#

Just

#

The AI bot told me that I need to set up WP Webhooks like this:

#

But I can't find the Headers or Payload section inside WP Webhooks

oak verge
blazing bone
#

our new swag shop, hosted on Netlify, is actually setup with WP Webhooks to rebuild static pages when our products change in WooCommerce