Vercel might an excellent choice for deploying your DocLayer application. It offers high speed, affordability, an extensive set of features, and a robust content delivery network - making it ideal for content-driven projects. We've prepared a seamless process to help you deploy your project quickly and easily on Vercel.
There are three ways to do so: Vercel Automation Panel, manually, and CD Pipeline. Choose the option that best suits your needs. Below, we've described how to set up your project for each deployment method.
Read the docs first
As the deployment process can vary, please read this documentation first - steps and their order may be different for your situation and scenario. Collect all necessary information before proceeding.
Create
Firstly you need to connect your project within the Vercel platform.
- Use Vercel UI. Simply use Vercel’s UI and follow the prompts to connect Vercel with your Github - it will ask you to authorize your account and select your project’s repository. This makes your deployments automatic, with builds triggered on every commit for both production and preview instances.

- Use the official Vercel CLI. This option is a bit more manual, but it gives you greater control over each action you take to deploy your project to the Vercel platform. You'll need to install the CLI on your machine.
The interface may prompt you to select an existing project to connect, if available. You can either choose one of the existing projects or create a new one as shown above. This flow might be ideal if you don't want to connect Vercel with your GitHub account - for various reasons.
Build
To build your project - whether using the Vercel platform, manually, or with a CI/CD pipeline - you’ll need to adjust your setup slightly. Follow the steps below to prepare your project for deployment on Vercel.
Install dl-vercel Module
To handle Vercel's static project structure, optimize the assets and connect your project automatically, we've built a dedicated module to use with the application. Install it first.
Then register it within your nuxt.config.ts file.
Both IDs can be retrieved from the Vercel panel. You don't need to add the IDs though - if they're not provided, the Vercel CLI will prompt you to connect your project during deployment.
Set dedicated preset
This step is optional; however, if you have any serverless functions (Nuxt Server Handlers), you need to add them to your build script as a Vercel preset.
This ensures that Nitro prepares your server endpoints for deployment as Vercel serverless functions (with special structure).
Be aware that the Vercel-dedicated build will be assembled in a different structure than the regular build, with assets and serverless function handlers prepared specifically for Vercel’s infrastructure. As a result, this build cannot be previewed locally. To preview the app locally, use the regular build command instead.
Build the project
If you're deploying manually, run the pnpm build command in your terminal. This will build the application into the dedicated .vercel folder in your project root.
If you're using automatic deployment through the Vercel platform, specify the build command in the appropriate field when setting up your project. Remember to push your changes to the repository.

Deploy
Now it's time to deploy your app. As mentioned before, you have three options for running your deployment process: you can rely on automatic deployments managed by the Vercel platform (if your project is connected to GitHub), deploy manually using the CLI, or use a CI/CD pipeline. Let's dive into each option to find the best one for you.
Automatic
Everything mentioned previously stays current. If you connect your project on GitHub to Vercel, each commit to your production or feature branch will automatically trigger a deployment - either as a preview or as your final production version. All you need is to complete the setup as shown above. More about setting your project with Vercel Platform you can read here.
Manual
Once your project has been built, you can use the Vercel CLI to deploy it manually from your terminal. Simply use the following commands based on your target environment:
Run these commands from the project root folder. This will use the already built app (the --prebuilt flag ensures this), upload it to Vercel, and as a final the URL for your preview or production deployment will be printed in the terminal.
CI/CD
If you want to automate your deployment in a similar way to connecting your GitHub repository directly to Vercel - but without actually connecting it - you can set up a CI/CD pipeline in your project to achieve the same results. Below is a sample workflow you can customize to fit your needs. Add it to the .github/workflows folder in the root of your project.
This action will be triggered whenever you push to the repository, according to the rules defined at the beginning. You will need a VERCEL_TOKEN, which you can generate in your Vercel Dashboard. Be sure to add it as a secret in your repository, as it is confidential.
