OptimAI
HTML

Deployment

Deploy OptimAI production-ready or development files to Vercel.

This guide explains how to deploy OptimAI HTML to Vercel using either:

  • Production-ready files (final static output)
  • Development files (source code with Vite build)

Prerequisites

  • A Vercel account (Sign up)
  • A Git repository (GitHub, GitLab, or Bitbucket) for continuous deployment
  • Node.js installed locally (only required for local testing and builds)

Pre-deployment checklist

Before deploying, complete these quick checks:

  1. Choose package type: Confirm whether you are deploying production-ready files or development files.
  2. Test locally:
    • Production-ready: Open index.html in your browser and confirm pages and assets load.
    • Development: Run bun run build, yarn build, npm run build, or pnpm build and confirm the build succeeds.
  3. Check paths: Make sure asset paths are correct and not pointing to local file paths.
  4. Commit latest changes: Push your final updates to your Git branch or repository.
  5. Confirm root directory: Verify the exact folder you will set as the Vercel root.

Choose your package type

1) Production-ready package

Use this option if you are deploying the folder that already contains final .html files and assets. No build step is needed.

Typical structure:

ai-agency/
├── *.html
├── assets/
├── images/
├── fonts/
└── vendor/

2) Development package

Use this option if you are deploying the source project with src/, public/, and Vite configuration.

Typical structure:

ai-agency-tailwind/
├── src/
├── public/
├── *.html
├── package.json
└── vite.config.js

Deployment method: Vercel Dashboard

Import your repository

  1. Sign in at vercel.com
  2. Click New Project
  3. Import your Git repository
  4. Select the repository or folder you want to deploy

Configure settings based on package type

A) Production-ready package settings

  • Framework preset: Other
  • Root directory: ./ (or the production folder path)
  • Build command: leave empty
  • Output directory: leave empty
  • Install command: leave empty

Vercel will serve files directly from your project root as a static site.

B) Development package settings

  • Framework preset: Vite
  • Root directory: ./ (or the development folder path)
  • Install command: bun install, yarn install, npm install, or pnpm install
  • Build command: bun run build, yarn build, npm run build, or pnpm build
  • Output directory: dist

Make sure your package.json includes a valid build script, for example:

{
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview"
  }
}

Deploy

  1. Click Deploy
  2. Wait for deployment to complete
  3. Open the generated Vercel URL to verify your site

Verify after deployment

After the first deployment, validate the live site:

  1. Open the homepage and 3-5 inner pages
  2. Check that CSS and JavaScript are loading correctly
  3. Verify images, icons, and fonts render properly
  4. Test navigation and menu links
  5. Open browser dev tools and confirm there are no critical console or network errors ::::

Deployment method: Vercel CLI

Install the CLI

Terminal
npm i -g vercel

Log in

Terminal
vercel login

Deploy from your project directory

Terminal
cd your-project-directory
vercel

Complete Vercel prompts

  • During prompts:
    • For a production-ready package, choose static or default settings with no build command
    • For a development package, set the build command and output directory (dist)

Final verification

  1. Confirm and complete deployment.
  2. Verify the deployment URL using the same checklist in Verify after deployment. ::::

Common issues and fixes

  • Blank page or broken styles: Check asset paths and confirm static files exist in the deployed root or output directory.
  • Build failed: Confirm dependencies are installed and the build script exists in package.json.
  • 404 on refresh (inner pages): Verify routing and file structure, especially when using direct .html page links.
  • Wrong folder deployed: Recheck the Vercel Root directory setting.
  • Old content still showing: Trigger a redeploy after pushing latest commits.

Notes and best practices

  • If your repository contains both package types, deploy each one as a separate Vercel project.
  • Use the production-ready package for the fastest deployment with no build process.
  • Use the development package when you want CI builds and source-level updates on each push.

Support resources

Copyright © 2026