Deploy to Vercel
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:
- Open
https://<your-site>/admin/loginand select Create the GitHub App. - Confirm on GitHub. The result page shows the environment variables.
- In Vercel, open Settings, then Environment Variables. Paste the block.
- 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
| Variable | Value |
|---|---|
SUPABASE_URL | The Supabase project URL |
SUPABASE_KEY | The publishable key |
DATABASE_URL | The 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:
| Variable | Use |
|---|---|
NUXT_SUPABASE_SECRET_KEY | Invites through the invite API of Supabase |
NUXT_PLUTO_MAIL_RESEND_API_KEY | Pluto mail with Resend |
NUXT_PLUTO_MAIL_FROM | The From address |
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.skipDeploytofalse.
export default defineNuxtConfig({
plutoGithub: {
commit: { skipDeploy: false }
}
})
[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.