Clay > Getting Started > Deploying Clay to Vercel
OverviewClayGetting StartedDeploying Clay to Vercel
Deploying Clay to Vercel

In this tutorial, we will walk through the steps to deploy a Clay storefront to Vercel, a popular hosting platform. Clay is a demo/framework for building Lana backed storefronts, and Vercel provides a simple and scalable hosting solution. By following this tutorial, you'll be able to deploy your Clay storefront to Vercel and make it accessible to the world.

Prerequisites

Before we begin, make sure you have the following:

  • A Clay storefront project ready for deployment. If you don't have one yet, refer to the Clay documentation on how to create a Clay storefront project.

  • An account on Vercel. If you don't have one, go to the Vercel website (https://vercel.com) and sign up for an account.

Step 1: Prepare your Clay project for deployment

Before deploying to Vercel, you need to prepare your Clay project by building the production-ready assets. Open your Clay project in a terminal or command prompt and run the following command:

npm run build

This command will compile and optimize your Clay project for production.

Step 2: Create a new Vercel project

Log in to your Vercel account and navigate to the Vercel dashboard. Click on the "New Project" button to create a new project.

Select your Clay project directory as the root directory for the project.

Step 3: Configure your deployment settings

In the deployment settings, you can customize various options for your Clay project. Configure the following settings:

  • Build Command: Enter the command to build your Clay project. In most cases, it will be npm run build.

  • Output Directory: Specify the output directory where the built files are located. For Clay projects, the default output directory is usually public.

  • Environment Variables: If your Clay project requires any environment variables, you can set them here.

Once you have configured the deployment settings, click on the "Deploy" button to start the deployment process.

Step 4: Monitor the deployment progress

Vercel will initiate the deployment process and build your Clay project. You can monitor the deployment progress in the Vercel dashboard. Once the deployment is complete, Vercel will provide you with a unique URL for your Clay storefront.

Step 5: Access your Clay storefront

Congratulations! Your Clay storefront is now deployed to Vercel. You can access it using the URL provided by Vercel. Open the URL in a web browser to see your Clay storefront live.

Step 6: Custom Domain (Optional)

If you want to use a custom domain for your Clay storefront, Vercel allows you to configure it easily. Follow the instructions in the Vercel documentation to set up a custom domain for your Clay storefront.

Conclusion

In this tutorial, you learned how to deploy a Clay storefront to Vercel. By following these steps, you can make your Clay storefront accessible to the world and benefit from Vercel's scalable hosting platform. Enjoy showcasing your Clay storefront to your customers!

Happy deploying!

PREVIOUS
Deploying Clay to Netlify
NEXT
Configuration