Basic deployment
- Fetches database URL from Yboard.
- Pushes database schema using
drizzle-kit pushfrompackages/db. - Builds the application with
bun vite buildinapps/web. - Uploads client and server files to Yboard.
- Prints the live URL.
Skip database push
If you haven’t changed the database schema, skip that step:Deployment environments
Yboard supports multiple deployment environments via the project’s npm scripts:
Preview and rollout deployments use the project’s npm scripts (defined in
apps/web/package.json) which build with environment-specific Astro configs and deploy via Wrangler.
What gets deployed
The CLI reads the build output fromapps/web/build/:
build/client/— Static assets (HTML, CSS, JS, images) served from the edge.build/server/— Server-side code running on Cloudflare Workers.
.dev.vars and wrangler.json in the server directory are excluded from upload.
How deployment works under the hood
Yboard deploys your app to Cloudflare Workers for Platforms, which provides isolated worker scripts per app. The deployment pipeline:- Asset upload session — Starts an upload session with Cloudflare. A manifest of file hashes determines which assets need uploading (unchanged assets are skipped).
- Asset upload — New or changed static assets are uploaded to the edge.
- Worker script upload — Your server-side code is uploaded with bindings:
YB_URL,YB_API_HOSTNAME— Yboard service URLsYB_ORGANIZATION_ID,YB_APP_ID— Your app identityYB_WORKOS_CLIENT_ID— Authentication config- Your custom secrets
- Configuration — The worker is configured with:
nodejs_compatcompatibility flag- Auto trailing-slash HTML handling
- Log forwarding via tail consumers
- Asset serving from the edge
Deployment environments in detail
Each environment (dev, preview, production) maintains its own:- Worker script — Separate deployed code
- Secrets — Environment-specific variables (see Secrets & Environment)
- Database branch — Isolated database (see Database Branches)
Moving between environments
From the web dashboard, changes flow through environments:- Dev → Preview — Deploy your development state to a preview environment for testing.
- Preview → Production — Promote a tested preview to production.
Viewing your deployment
After deployment, the CLI prints the URL. You can also find it in:- The terminal output of
yboard deploy. - The Version History tab in the web dashboard.
Viewing logs
After deploying, view runtime logs:Prerequisites
- Run
yboard loginfirst to authenticate. - Run
yboard initfirst to provision the database. - Run from the project root (the CLI expects
apps/web/to exist).