Is there a way to automatically trigger a redeploy of a project (frontend) when changes are made to another separate project (backend)?
depends on where your frontend is located
if you are using Vercel and NextJS, you'd want to do on-demand revalidation
i don't think they expose a way to trigger a full rebuild though
but, because Payload offers hooks, on the Payload side, you can definitely do this
it just matters where your frontend is and how it's built
There’s an example demonstrating how to set this up
https://github.com/payloadcms/payload/tree/master/examples/preview/cms
It also includes a full Next.js app showing how to handle this on your front-end using the pages router (app router coming soon)
Essentially, you just use an
afterChange
hook on your collection to fire a request to your front-end however needed
https://github.com/payloadcms/payload/blob/master/examples/preview/cms/src/collections/Pages/hooks/revalidatePage.tsStar
Discord
online
Get help straight from the Payload team with an Enterprise License.