Can i use Directus with a static site generator?

Can i add a function to the Directus content dashboard that triggers a CD pipeline (e.g. GitHub workflow) which renders and deploys a static site (e.g. with Astro.js) that uses the data from Directus?

Why do i want to do that? Because i have a server already but it’s not very fast, so not suitable for running e.g. Next.js (with or without export mode, doesn’t matter).

Running e.g. Next.js in the cloud can be fast, but either costs money to run non-export mode for SSR, or free using Cloudflare pages, Netlify etc. but only with static site generation (SSG). (And if i only do SSG, i’ll use Astro over Next.js)

The only missing piece in my plan is how to trigger the deployment.

Yes, you can! You can use a flow (action trigger) with a webhook operation to do that. You can also create your own logic around this with flows.

These links might help you