Skip to Content

Vercel

Vard works with Vercel out of the box. This guide covers the recommended setup.

Deploy Hook

The simplest way to trigger rebuilds when your client publishes is via a Vercel Deploy Hook.

  1. In your Vercel project, go to Settings → Git → Deploy Hooks
  2. Create a hook named “Vard publish” for your production branch
  3. Copy the hook URL
  4. In your Vard workspace, go to Settings → Deployment → Deploy Hook URL and paste it

When your client clicks Publish, Vard calls this URL and Vercel triggers a new build.

Environment variables

Add VARD_API_KEY in your Vercel project’s environment variables:

  1. Settings → Environment Variables
  2. Add VARD_API_KEY with your workspace API key
  3. Enable it for Production and optionally Preview

For most sites, ISR with a short revalidation interval is the best balance of performance and freshness:

lib/vard.ts
import { createVardNext } from "@vard-app/sdk/next"; export const vard = createVardNext({ apiKey: process.env.VARD_API_KEY, revalidate: 60, });

Content changes will appear within 60 seconds of publishing, without a full rebuild.

On-demand revalidation

For instant content updates without a rebuild, set up a revalidation webhook. See Cache Revalidation.

Preview environments

For Vercel Preview deployments (e.g. pull request previews), you can use a separate schema version to avoid conflicts with production content. See Schema Versioning.

Last updated on
Vard SDK Documentation