---
title: Deploy to Vercel
description: Deploy your CamelMind documentation site to Vercel in minutes.
---

Vercel makes it easy to deploy your CamelMind documentation site. It automatically builds and deploys your site on every Git push, provides HTTPS out of the box, and creates preview deployments for pull requests.

---

<Callout type="important" title="Before you begin">

You'll need:

- A CamelMind documentation project
- A GitHub repository containing your project
- A Vercel account

</Callout>

---

## Deploy your site

<Steps>

<Step n={1} title="Push your project to GitHub">

Commit your project and push it to a GitHub repository.

```bash
git add .
git commit -m "Initial commit"
git push
```

<Callout type="note">
If you haven't created a repository yet, create one on GitHub first, then push your project.
</Callout>

</Step>

<Step n={2} title="Import the repository into Vercel">

1. Sign in to Vercel.
2. Select **Add New → Project**.
3. Choose your GitHub repository.
4. Click **Import**.

CamelMind is built on Next.js, so Vercel automatically detects the project and configures the build settings.

</Step>

<Step n={3} title="Configure environment variables">

Before deploying, configure your project's environment variables.

| Variable | Description |
| --- | --- |
| `CAMELMIND_URL` | The public URL of your documentation site. |
| `SESSION_SECRET` | Required when authentication is enabled. |

If you're using OpenID Connect (OIDC), also configure:

- `OIDC_ISSUER`
- `OIDC_CLIENT_ID`
- `OIDC_CLIENT_SECRET`

See [Environment Variables](/reference/environment-variables) for the complete list of supported variables.

</Step>

<Step n={4} title="Deploy">

Click **Deploy**.

Vercel builds and publishes your documentation site. Once deployment completes, your site is available at its public URL.

Every future push to your default branch automatically triggers a new deployment.

</Step>

</Steps>

---

## Use a custom domain

To use your own domain:

1. Open your Vercel project.
2. Go to **Settings → Domains**.
3. Add your domain and follow the DNS instructions.
4. Update `CAMELMIND_URL` to match your new HTTPS URL.

---

## Preview deployments

Every pull request automatically receives its own preview deployment.

This allows reviewers to browse documentation changes before they're merged into your main branch.

---

## Troubleshooting

<Details summary="The build fails" id="build-failed">

Verify that all project dependencies are committed to your repository.

If you've recently installed new packages:

```bash
npm install
git add package.json package-lock.json
git commit -m "Update dependencies"
git push
```

</Details>

<Details summary="Authentication redirects to the wrong URL" id="wrong-url-redirection">

Verify that `CAMELMIND_URL` exactly matches your site's public HTTPS URL, without a trailing slash.

</Details>

<Details summary="Environment variables aren't available" id="env-variables-unavailable">

Environment variables must be configured in your Vercel project settings.

After adding or updating variables, redeploy your project.

</Details>