Web Deployment
Description
Deploy websites to the internet and create databases. Supports Vercel
(static/fast APIs), Railway (long-running operations), and Supabase (database).
Triggers
- deploy
- website
- hosting
- vercel
- railway
- supabase
- go live
- put online
- launch
- production
- make it live
Instructions
Provider Decision Framework
Pick the right hosting provider based on what the project does:
| Project Type |
Provider |
Why |
| Static site / marketing page |
Vercel |
Free, fast CDN |
| Next.js with simple APIs (< 10s) |
Vercel + Supabase |
Native Next.js support |
| App with LLM API calls |
Railway + Supabase |
Vercel times out at 10s |
| App with streaming / WebSockets |
Railway + Supabase |
No timeout limits |
| App with cron jobs / queues |
Railway + Supabase |
Persistent processes |
| Pure API backend (no frontend) |
Railway + Supabase |
Server process |
| When in doubt |
Railway |
No timeout limits |
Critical: Vercel has a 10-second serverless function timeout on free tier
(60s on Pro). Any API route that calls OpenAI/Anthropic, does heavy processing,
or streams data will fail on Vercel. Always use Railway for those projects.
The deploy_website tool with provider: "auto" detects this automatically by
scanning API routes and package.json dependencies.
Deployment Workflow
- Scaffold the project (Next.js, etc.) and get it building locally
- Create database with
create_database if the project needs persistence —
just pass a project name. The tool returns url, anon_key, service_role_key,
and db_url automatically. Never ask the user for these keys.
- Wire env vars — pass the credentials from the
create_database result
to deploy_website via env_vars:env_vars: {
"NEXT_PUBLIC_SUPABASE_URL": <url from create_database>,
"NEXT_PUBLIC_SUPABASE_ANON_KEY": <anon_key from create_database>,
"SUPABASE_SERVICE_ROLE_KEY": <service_role_key from create_database>,
"DATABASE_URL": <db_url from create_database>
}
- Build locally — always run
npm run build before deploying to catch errors
- Deploy with
deploy_website
- Verify — check the returned URL in the browser
Important: The only token the user sets up is the Supabase access token
in the vault (vault_set key=supabase_access_token value=...). All per-project
keys are auto-generated by create_database. Do not ask the user for anon keys,
service role keys, or database URLs.
Provider-Specific Notes
Vercel:
- Uses
vercel --yes --token $TOKEN --prod (non-interactive)
- Env vars set via
vercel env add
- Token stored in vault as
vercel_token
- Free tier: unlimited static sites, 10s function timeout
Railway:
- Uses
RAILWAY_TOKEN=$TOKEN railway up --detach
- Env vars set via
railway variables set KEY=VALUE
- Token stored in vault as
railway_token
- Free tier: $5/month credit, no timeout limits
Supabase:
- Created via Management API (no CLI needed)
- Token stored in vault as
supabase_access_token
- Free tier: 2 projects, 500MB database, 1GB file storage
- Includes Postgres, Auth, Storage, Realtime out of the box
Anti-Patterns
- Don't deploy to Vercel if any API route calls an LLM — it will timeout.
The auto-detect catches most cases but double-check manually.
- Don't hardcode API keys — use env_vars parameter on
deploy_website
to inject them into the platform's environment.
- Don't skip
npm run build — deploying broken code wastes time and
deploy minutes. Build locally first, fix errors, then deploy.
- Don't create multiple Supabase projects for the same app — one project
gives you database + auth + storage + realtime. Use tables, not projects,
to separate concerns.
- Don't forget to pass database credentials — the most common deployment
failure is the app trying to connect to Supabase without the URL/key env vars.
Verify
- The deploy command was actually run and the build/log output (or deploy URL) is captured
- The deployed URL was opened and returned a 2xx; key routes were sampled, not just the index
- Environment variables required by the app are present in the target environment; missing-var failures were ruled out
- A rollback plan (previous deployment ID, git SHA, or one-line revert command) is documented before promoting to production
- Health/observability check (logs, error tracker, status page) was inspected post-deploy; baseline error rate is recorded
- DNS / domain / SSL configuration was confirmed, not assumed to carry over from previous deploys
1---2name: web-deployment3description: Web Deployment4---5# Web Deployment67## Description8Deploy websites to the internet and create databases. Supports Vercel9(static/fast APIs), Railway (long-running operations), and Supabase (database).1011## Triggers12- deploy13- website14- hosting15- vercel16- railway17- supabase18- go live19- put online20- launch21- production22- make it live2324## Instructions2526### Provider Decision Framework2728Pick the right hosting provider based on what the project does:2930| Project Type | Provider | Why |31|---|---|---|32| Static site / marketing page | Vercel | Free, fast CDN |33| Next.js with simple APIs (< 10s) | Vercel + Supabase | Native Next.js support |34| App with LLM API calls | **Railway** + Supabase | Vercel times out at 10s |35| App with streaming / WebSockets | **Railway** + Supabase | No timeout limits |36| App with cron jobs / queues | **Railway** + Supabase | Persistent processes |37| Pure API backend (no frontend) | **Railway** + Supabase | Server process |38| When in doubt | **Railway** | No timeout limits |3940**Critical**: Vercel has a **10-second serverless function timeout** on free tier41(60s on Pro). Any API route that calls OpenAI/Anthropic, does heavy processing,42or streams data **will fail** on Vercel. Always use Railway for those projects.4344The `deploy_website` tool with `provider: "auto"` detects this automatically by45scanning API routes and package.json dependencies.4647### Deployment Workflow48491. **Scaffold** the project (Next.js, etc.) and get it building locally502. **Create database** with `create_database` if the project needs persistence —51 just pass a project name. The tool returns `url`, `anon_key`, `service_role_key`,52 and `db_url` automatically. **Never ask the user for these keys.**533. **Wire env vars** — pass the credentials **from the `create_database` result**54 to `deploy_website` via `env_vars`:55 ```56 env_vars: {57 "NEXT_PUBLIC_SUPABASE_URL": <url from create_database>,58 "NEXT_PUBLIC_SUPABASE_ANON_KEY": <anon_key from create_database>,59 "SUPABASE_SERVICE_ROLE_KEY": <service_role_key from create_database>,60 "DATABASE_URL": <db_url from create_database>61 }62 ```634. **Build locally** — always run `npm run build` before deploying to catch errors645. **Deploy** with `deploy_website`656. **Verify** — check the returned URL in the browser6667**Important**: The only token the user sets up is the Supabase **access token**68in the vault (`vault_set key=supabase_access_token value=...`). All per-project69keys are auto-generated by `create_database`. Do not ask the user for anon keys,70service role keys, or database URLs.7172### Provider-Specific Notes7374**Vercel**:75- Uses `vercel --yes --token $TOKEN --prod` (non-interactive)76- Env vars set via `vercel env add`77- Token stored in vault as `vercel_token`78- Free tier: unlimited static sites, 10s function timeout7980**Railway**:81- Uses `RAILWAY_TOKEN=$TOKEN railway up --detach`82- Env vars set via `railway variables set KEY=VALUE`83- Token stored in vault as `railway_token`84- Free tier: $5/month credit, no timeout limits8586**Supabase**:87- Created via Management API (no CLI needed)88- Token stored in vault as `supabase_access_token`89- Free tier: 2 projects, 500MB database, 1GB file storage90- Includes Postgres, Auth, Storage, Realtime out of the box9192### Anti-Patterns9394- **Don't deploy to Vercel if any API route calls an LLM** — it will timeout.95 The auto-detect catches most cases but double-check manually.96- **Don't hardcode API keys** — use env_vars parameter on `deploy_website`97 to inject them into the platform's environment.98- **Don't skip `npm run build`** — deploying broken code wastes time and99 deploy minutes. Build locally first, fix errors, then deploy.100- **Don't create multiple Supabase projects for the same app** — one project101 gives you database + auth + storage + realtime. Use tables, not projects,102 to separate concerns.103- **Don't forget to pass database credentials** — the most common deployment104 failure is the app trying to connect to Supabase without the URL/key env vars.105106## Verify107108- The deploy command was actually run and the build/log output (or deploy URL) is captured109- The deployed URL was opened and returned a 2xx; key routes were sampled, not just the index110- Environment variables required by the app are present in the target environment; missing-var failures were ruled out111- A rollback plan (previous deployment ID, git SHA, or one-line revert command) is documented before promoting to production112- Health/observability check (logs, error tracker, status page) was inspected post-deploy; baseline error rate is recorded113- DNS / domain / SSL configuration was confirmed, not assumed to carry over from previous deploys