Configure Astro
Add the Workflow integration to your Astro config:The integration automatically:
astro.config.mjs
- Adds Vite plugins for workflow transformation and hot reloading
- Builds workflow bundles during development
- Generates Vercel functions during production builds (when deployed to Vercel)
How it works
The Astro integration:- Uses
@workflow/rollupfor code transformation - Uses
@workflow/vitefor hot module replacement - Builds workflow bundles during the
astro:config:setuphook - Generates Vercel-specific functions during the
astro:build:donehook - Automatically discovers workflows in your project
Example workflow
src/workflows/newsletter.ts
Triggering workflows
Start workflows from API routes:src/pages/api/newsletter.ts
Deployment
When deploying to Vercel with the Astro Vercel adapter:Next steps
Core Concepts
Learn about workflows and steps
API Reference
View the full Astro API reference