Deploy to Vercel
About 654 wordsAbout 2 min
2026-08-31
This guide covers Vercel platform configuration. For decisions on build locations and managing platform build commands, see Deployment Overview.
Vercel can build directly from Git repositories, or receive prebuilt static dist/ artifacts. Choose one workflow.
Requirements
- Source code is pushed to GitHub, GitLab, or Bitbucket;
siteis set to your production domain (editsrc/config/siteConfig.tsin single-repo mode, orconfig/site.yamlin the content repo).
Option 1: Git integration (the host builds)
Import repository
Visit vercel.com/new and import the Shirone repository.
Confirm build settings
Vercel detects Astro and suggests default settings; confirm the following parameters:
Setting Value Framework Preset AstroBuild Command pnpm buildOutput Directory distInstall Command pnpm installAdd environment variables
Skip for single-repo mode. For dual-repo mode, expand Environment Variables and add:
Key Value CONTENT_REPO_URLhttps://x-access-token:<TOKEN>@github.com/<OWNER>/<CONTENT_REPO>.gitCONTENT_REPO_REFmain(optional)GIT_TERMINAL_PROMPT0Public content repos can use
https://github.com/<OWNER>/<CONTENT_REPO>.gitdirectly without tokens.Select Node.js version
After project initialization, navigate to Settings -> General -> Node.js Version and select
26.x. Vercel does not read theNODE_VERSIONenvironment variable.Deploy
Click Deploy. Initial full site builds take approximately 2 to 5 minutes.


Subsequent pushes to main trigger production deployments, while pushes to other branches generate preview deployments with isolated preview URLs.
Change environment variables later
If variables were omitted during setup or tokens need rotation, navigate to Deployments -> Environments, select Production, Preview, or Development, modify the value, and redeploy.

Option 2: deliver dist from Actions or a local build
Build with GitHub Actions or locally, then upload static files directly to Vercel. See Cross-Repo CI or Local Build.
Before uploading, configure the Vercel project as pure static hosting:
- Go to Settings -> Build & Output Settings;
- Change Framework Preset to
Other; - Turn off the Build Command override switch and clear its text field;
- Turn off the Output Directory override switch and clear its text field;
- Navigate to Settings -> Git, and disconnect the repository or disable automatic deployments.
Disconnecting Git alone is not sufficient; build commands remain stored in project settings and must be cleared manually.
Deploy using the CLI:
pnpm dlx vercel@latest deploy dist --prodInitial runs require logging in and linking your project.
Custom domain
- Go to Settings -> Domains and bind your custom domain;
- Configure an
Arecord pointing to76.76.21.21, or aCNAMErecord pointing tocname.vercel-dns.com; - Once DNS propagation finishes, SSL certificates are issued automatically.
vercel.json
The repository root includes a default vercel.json for configuring asset cache headers:
{
"headers": [
{
"source": "/assets/(.*)",
"headers": [
{ "key": "Cache-Control", "value": "public, max-age=31536000, immutable" }
]
}
]
}Troubleshooting
Deployment log reportsCommand "pnpm build" exited with 1
The project uses artifact upload, but Vercel still attempts to run a build command. Follow Option 2 to clear Build Command and Output Directory, then redeploy. When logs no longer show Running "vercel build", the setting is active.
Build fails due to outdated Node version
Go to Settings -> General -> Node.js Version and select 26.x. Setting NODE_VERSION as an environment variable has no effect on Vercel.
Build times out
Shirone builds encompass content synchronization, image optimization, font subsetting, and Pagefind search indexing. If builds time out repeatedly, build with GitHub Actions and upload prebuilt output instead; see Cross-Repo CI.
Search is non-functional
Ensure that the deployed directory includes the complete dist/pagefind/ folder. Custom CI configurations often miss this directory due to file filters.
Next steps
- Cross-Repo CI: build using Actions and deliver to Vercel
- Deployment Overview: compare other hosting providers
Copyright
Copyright Ownership:Dawn6666666
License under:Attribution 4.0 International (CC-BY-4.0)