Deploy and Test Local Feature Branches Like a Pro with Vercel CLI - XM Cloud and Vercel

Hello everyone! In this blog, we'll explore how to use the Vercel CLI to deploy local branch changes to a Vercel Preview environment for quick verification and validation. Ideally, we have a proper CI/CD pipeline in place to build and deploy changes to the appropriate Vercel environment. However, there are situations—such as urgent bug fixes—where you might need to quickly validate your changes without waiting for the full pipeline. In such cases, you can use the Vercel CLI to deploy your local changes directly, typically to a Preview environment. Even if something goes wrong, Vercel makes it easy to roll back: you can simply redeploy a previous build from the dashboard and restore the environment within minutes Let's begin by setting up the Vercel CLI on your local machine. At this point, you should have already created a branch from your main or develop branch and pulled the latest commits. You've made your changes and tested them locally — now you're ready to deplo...