Deploy
pnpm build writes a static site to dist/. There is no server, no adapter and no
runtime: any static host will serve it.
Two things to do before the first deploy.
-
Set
site.urlinsrc/config.tsto the address the site will actually have. Canonical links, the sitemap, the feed and the share cards are absolute, and they are all wrong until you do.SITE_URLin the build environment overrides it, which is useful for preview deployments:SITE_URL=https://staging.example.com pnpm build -
Run the gate:
pnpm check && pnpm build. A build that fails on a host usually fails locally first.
Your own repository
The Pro repository is private and cannot be forked. Start your archive as a repository of your own:
git clone https://github.com/ondelva/astro-theme-vitrine-pro.git my-archive
cd my-archive
rm -rf .git
git init && git add -A && git commit -m "Vitrine Pro"
git remote add origin [email protected]:you/my-archive.git
git push -u origin main
From the zip, unpack it and start at git init.
Taking an update. Releases within 1.x are yours for the life of the licence. Keep the theme as a second remote and merge the release tag:
git remote add theme https://github.com/ondelva/astro-theme-vitrine-pro.git
git fetch theme --tags
git merge v1.1.0 --allow-unrelated-histories # first time only
Your content lives in src/content/ and your changes in src/config.ts and
src/styles/theme.css, so the conflicts are usually few and always in files you have
edited. Read CHANGELOG.md first.
Cloudflare Pages
Create a project, connect the repository, and set:
- Framework preset: Astro
- Build command:
pnpm build - Output directory:
dist - Environment variable:
NODE_VERSION=22
Cloudflare reads packageManager in package.json and uses the right pnpm.
Vercel
Import the repository; Vercel detects Astro and fills in pnpm build and dist. Nothing
else is needed. Set SITE_URL as an environment variable if you want preview deployments
to have correct canonical URLs.
A new project is private: the build succeeds, and the deployment URL answers with a login screen (Deployment Protection, a 302 to Vercel’s SSO). The production alias is public, but attach your domain, or turn protection off under Settings → Deployment Protection, before you send a deployment link to anyone.
Netlify
Import the repository and set:
- Build command:
pnpm build - Publish directory:
dist - Environment variable:
NODE_VERSION=22
Two things a first deploy does on its own. pnpm-workspace.yaml makes Netlify read the
project as a monorepo and propose pnpm --filter astro-theme-vitrine... run build; leave
it, it builds correctly. And a new site is private by default, so the .netlify.app URL
answers 401 until you attach a domain or make the site public under Project configuration →
General → Visitor access.
Anywhere else
Upload dist/. It is plain files. A 404.html is generated, so point the host’s not-found
handler at it if that is not automatic.
Continuous integration
.github/workflows/ci.yml runs on push and pull request: pnpm check, pnpm lint,
pnpm check:contrast, pnpm build, Lighthouse CI against the thresholds in
lighthouserc.cjs, and an internal link check over dist/. It needs no secrets. Delete
the file if you would rather not run it.
After deploying
- Search (Pro) is indexed at build time, so check it on the deployed site rather than
in
pnpm dev. /robots.txtis generated fromsite.urland points at the sitemap. It allows everything; editsrc/pages/robots.txt.tsto narrow it.- Analytics are off until you set
analytics.providerandanalytics.idinsrc/config.ts. - The legal pages (
privacy.mdx,terms.mdx) are placeholders. Replace them.
Next: Content