Deploying on Vercel

Vercel is fully compatible with BCMS. You don’t need any special setup - just make sure your environment variables are correctly set.

Set environment variables

In your Vercel dashboard, define the following variables:

  • NEXT_PUBLIC_BCMS_ORG_ID

  • NEXT_PUBLIC_BCMS_INSTANCE_ID

  • NEXT_PUBLIC_BCMS_API_KEY_ID

  • NEXT_PUBLIC_BCMS_API_KEY_SECRET

These values should match what you use locally. If you are using a separate API key for media, make sure to include that as well.

Reference them in code

You probably have the keys used in code somewhere like this:

import { Client } from '@thebcms/client';

export const bcms = new Client(
  process.env.NEXT_PUBLIC_BCMS_ORG_ID,
  process.env.NEXT_PUBLIC_BCMS_INSTANCE_ID,
  {
    id: process.env.NEXT_PUBLIC_BCMS_API_KEY_ID,
    secret: process.env.NEXT_PUBLIC_BCMS_API_KEY_SECRET,
  }
);

Redeploy on content change

If you're using static generation, set up a webhook to trigger Vercel deploys on content updates from BCMS.