Guides

Deploy to Vercel

Deploy a Pluto site to a host with a server runtime.

A Pluto site needs a server runtime. The admin routes and the public read routes run on the server. A static export does not work for the Git CMS.

The templates name Vercel, Netlify, and Node as hosts with a server runtime. This guide uses Vercel as the example.

Step 1: push the project

Push the project to a GitHub repository. For the Git CMS, this repository also holds the content.

Step 2: import the project

Import the repository in Vercel. Vercel detects Nuxt.

Step 3: set the environment variables

Set the variables in the settings of the Vercel project.

Git CMS

Do not fill the GitHub App values by hand. Deploy first. Then Pluto creates the GitHub App from the site:

  1. Open https://<your-site>/admin/login and select Create the GitHub App.
  2. Confirm on GitHub. The result page shows the environment variables.
  3. In Vercel, open Settings, then Environment Variables. Paste the block.
  4. Redeploy. Install the App on the repository. Sign in.

See Quickstart for each step. The variables are run-time values. The module does not check them at build time. The Reference lists every variable. To create the App by hand, see GitHub App.

The template uses the github storage in production. Add the production callback URL to the App only if you created the App by hand. See Callback URLs.

Supabase

VariableValue
SUPABASE_URLThe Supabase project URL
SUPABASE_KEYThe publishable key
DATABASE_URLThe Postgres connection string. The admin uses it to apply migrations. When it is not set, the setup and migrations pages ask for the string.

These variables are optional. Set them in the environment of the running server, not in the build environment:

VariableUse
NUXT_SUPABASE_SECRET_KEYInvites through the invite API of Supabase
NUXT_PLUTO_MAIL_RESEND_API_KEYPluto mail with Resend
NUXT_PLUTO_MAIL_FROMThe From address
The mail variables are run-time values. Do not put them in the build environment.

Step 4: deploy

Deploy the project. Open /admin and sign in.

For a Supabase site, the first visit goes to /admin/setup. See Supabase layer.

Commits and rebuilds

A content save in the Git CMS is a commit. On Vercel, Pluto finds the repository from the Vercel variables, so you need not set plutoGithub.github.repo. By default, the commit message ends with [skip ci], so a host that honors the marker does not rebuild on each save.

  • A site that reads its content at run time, such as the blog template, needs no rebuild for a content change.
  • A site that builds its pages from the content files must rebuild on each save. Set plutoGithub.commit.skipDeploy to false.
nuxt.config.ts
export default defineNuxtConfig({
  plutoGithub: {
    commit: { skipDeploy: false }
  }
})
Not every host honors [skip ci]. Test it on your project, and check the documentation of your host. Vercel has an "Ignored Build Step" setting that lets a project skip a build by rule.