Deploying on Netlify
Netlify works seamlessly with BCMS. There’s no special configuration required - just set your environment variables properly.
Set environment variables
In your Netlify project dashboard, add the following environment variables:
NEXT_PUBLIC_BCMS_ORG_ID
NEXT_PUBLIC_BCMS_INSTANCE_ID
NEXT_PUBLIC_BCMS_API_KEY_ID
NEXT_PUBLIC_BCMS_API_KEY_SECRET
These should match what you use in local development.
Reference them in code
Use the environment variables when initializing the BCMS client:
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, } );
Trigger builds on content updates
For static builds, you can connect a webhook in BCMS to trigger Netlify deploys when content is published or updated.