BACK TO BLOG

Setting Up Bugster with Vercel Automation for Protected Deployments

June 22, 2025
Facundo Lopez Scala
bugstervercelautomationprotected-deploymentsci-cdpreview-deployments

Setting Up Bugster with Vercel Automation for Protected Deployments

Integrating Bugster with Vercel's preview deployments provides a powerful way to automatically test your changes before they go live. In this guide, we'll walk you through setting up Vercel automation for repositories with protected deployments.

What You'll Learn

By the end of this tutorial, you'll know how to:

  • Set up Vercel automation API for your project
  • Configure Bugster to work with protected Vercel deployments
  • Run automated tests in your preview deployments

Prerequisites

  • A Vercel account with admin access to your project
  • A repository with protected deployments enabled
  • Bugster CLI installed and configured in your project

Step 1: Setting Up Vercel Automation API

First, we'll need to set up the automation API in your Vercel project settings. This process is straightforward and only needs to be done once per project.

Accessing Project Settings

  1. Log in to your Vercel dashboard
  2. Select the project you want to configure
  3. Click on the "Settings" tab in the main navigation
  4. From the settings menu, select "Deployment Protection"

Enabling Protection Bypass for Automation

  1. In the Deployment Protection settings, scroll down to find the "Protection Bypass for Automation" section
  2. Click on "Generate New Secret" to create a new API key
  3. A new secret will be generated - this will be your x-vercel-protection-bypass token

Watch this video to see the process of copying the API key:

Important Security Notes

  • Store this API key securely - it provides access to all protected deployments in your project
  • The key will be automatically added to your deployments as VERCEL_AUTOMATION_BYPASS_SECRET
  • If you need to rotate the key, you can generate a new one at any time
  • Remember that regenerating the key will invalidate the previous one

Step 2: Configuring Bugster for Protected Deployments

Once you have your Vercel automation API key, you'll need to configure Bugster to use it for protected deployments.

Adding the Vercel API Key to Bugster Configuration

Open your IDE and locate the .bugster/config.yaml file in your project. You'll need to add the Vercel API key to enable access to protected deployments.

Add the following configuration to your config.yaml:

x-vercel-protection-bypass: "<your-vercel-api-key>"

Replace <your-vercel-api-key> with the API key you obtained from the Vercel dashboard.

How It Works

When you push changes to your repository:

  1. Vercel creates a preview deployment
  2. Bugster detects the preview URL
  3. The configured API key allows Bugster to access the protected deployment
  4. Tests run automatically against the preview environment
  5. Results are reported back to your pull request

Troubleshooting

If you encounter issues:

  1. Verify the API key is correctly formatted in your config.yaml
  2. Ensure the API key has the correct permissions in Vercel
  3. Check that protected deployments are properly configured
  4. Verify your Bugster configuration is up to date

Remember to keep your Vercel API key secure and never share it publicly. If you suspect your key has been compromised, rotate it immediately through the Vercel dashboard.