Lab - Deploy Catalyst to Vercel
Lab - Deploy Catalyst to Vercel
Lab - Deploy Catalyst to Vercel
Your final step for your custom Catalyst storefront will be to deploy it to a publicly available Vercel project.
In this lab, you will:
Prerequisites
If you are setting up a GitHub account for the first time, see the documentation for signing in with a passkey or for generating an SSH key.
Note that in a project you have initially set up with the Catalyst CLI installer, you will already have a local Git repository, ready to set up a remote and push your history.
In this exercise, your local codebase was set up without a Git repository, so your first step will be to initialize one.
Before deploying to Vercel, your code will first need to be under source control in a remote repository with your preferred Git provider.
The initial project setup should have left a local Git repository in place, but if necessary, initialize one before committing the current state:

If you have not connected a Git account, you’ll have the chance to do so when you create a new project in the following steps.

.env.local with the same values. You can do this by selecting the entire contents of .env.local and pasting in the first var key field.Keep in mind that, since you’ve copied your local project’s configuration settings, MAKESWIFT_SITE_API_KEY contains the API key for the developer site in your Makeswift workspace. Once you have updated the domain name of your storefront channel and Makeswift site to point to your own hosted Catalyst application, make sure to update this value with the appropriate API key.
The build and deployment process will likely take several minutes. When it’s complete, follow the navigation link to visit your new storefront. You now have a working Catalyst storefront URL that can be shared publicly!

As you customize your Catalyst project, re-deploying to Vercel is as simple as pushing your latest Git commits to your GitHub remote repo.
Just as you cleared the Next.js Data Cache manually in your local environment, you may need to do so sometimes for your deployed Vercel project.
Navigate to Settings > Data Cache in your project to find the Purge Cache option.
With the completion of this hands-on lab, you have a publicly available custom Catalyst storefront with its own auto-generated Vercel domain. However, BigCommerce and Makeswift do not yet “know” about this custom domain. Any storefront links generated by BigCommerce will still be for the URL of your original preview environment.
In a real-world scenario, once you are able to configure a domain name to point to your hosted storefront, your final step would be to reconfigure your base URL settings in BigCommerce and Makeswift.
checkout.mystore.com, pointing to store-{{store_hash}}-{{channel_id}}.mybigcommerce.com.) Set this subdomain as the checkout URL for your channel.MAKESWIFT_SITE_API_KEY environment variable in your hosting environment with the API key of your primary Makeswift site.