What is your developer-dependent CMS actually costing you? Calculate your costs and get a full report
What is your developer-dependent CMS actually costing you? Calculate your costs and get a full report
Deployment
Deploy the Agility SvelteKit starter to Vercel — zero-config adapter, environment variables, and rebuilding on publish with Deploy Hooks.
Legacy — SvelteKit docs are no longer actively maintained. The SvelteKit starter targets SvelteKit 2; SvelteKit 3 shipped in October 2026. See why we recommend Next.js and .NET. If you need SvelteKit, let us know.
Vercel is the fastest path to production for the SvelteKit starter: the starter ships with @sveltejs/adapter-auto, which resolves to the Vercel adapter automatically — zero config.
Push your copy of the starter to GitHub (or GitLab/Bitbucket).
On vercel.com, Add New → Project, import the repo. Vercel detects SvelteKit and sets the build for you (vite build via npm run build).
The starter reads its config from $env/static/private, which is inlined at build time — so these must be set in Project → Settings → Environment Variables before you build:
| Variable | Value |
|---|---|
AGILITY_GUID | Your instance GUID (Settings → API Keys) |
AGILITY_API_FETCH_KEY | Fetch (live) API key |
AGILITY_API_PREVIEW_KEY | Preview API key |
AGILITY_SITEMAP | Sitemap/channel reference name (e.g. website) |
AGILITY_LOCALES | Locale code (e.g. en-us) |
Deploy — the whole sitemap prerenders at build time.
The starter prerenders every page (see Routing & Sitemaps), so published changes appear after a rebuild:
Publish → Vercel rebuilds → fresh content, typically in a minute or two.
adapter-auto is fine, but you can make the target explicit (and unlock Vercel-specific options like the Node runtime version):
npm i -D @sveltejs/adapter-vercel@6
The starter uses SvelteKit 2.
@sveltejs/adapter-vercel7 and later require SvelteKit 3, so install version 6 until you upgrade the starter to SvelteKit 3.
// svelte.config.js
import adapter from '@sveltejs/adapter-vercel';
export default { kit: { adapter: adapter() } };
Preview mode note: the starter's preview toggle (the
previewModecookie) is enabled in local dev. Production on Vercel serves published content — usenpm run devlocally (or a dedicated preview deployment with preview keys) for reviewing staged content.