This document describes how TEI Lex-0 is deployed across Vercel and GitHub Pages, how releases are published, and the constraints that keep the release archive stable and reproducible.
lex-0.orgserves the current release from Vercel (main line).dev.lex-0.orgserves the dev line from Vercel.lex-0.org/releases/vX.Y.Z/serves archived releases from GitHub Pages via a Vercel rewrite.- Release content is immutable and produced only from annotated tags on
main.
- Production domain:
lex-0.org-> Vercel project formain. - Dev domain:
dev.lex-0.org-> Vercel project fordev. - Release archive:
lex-0.org/releases/:path*-> GitHub Pages via Vercel rewrite.
Vercel rewrite (main project):
/releases/:path* -> https://<user>.github.io/<repo>/releases/:path*Note: keep this as a rewrite, not a redirect, so the URL remains lex-0.org/releases/....
Two Vercel projects are expected:
- Main project: production branch
vercel-main->lex-0.org. - Dev project: production branch
vercel-dev->dev.lex-0.org.
These branches are artifact-only deployments that contain only the built site.
- GitHub Pages is served from
gh-pages. - Releases are published into
gh-pages/releases/vX.Y.Z/. - The release archive must be immutable. If a tag already exists, the publish should fail.
- A release is produced only from an annotated tag on
mainnamedvX.Y.Z.
- HTML output must use relative links for assets and internal navigation.
- Absolute links to
github.ioor to/will bypass rewrites and break releases. - The CI link hygiene check enforces relative links; do not "fix" links in post-processing.
All deployments are handled in GitHub Actions. High-level triggers:
- Pull requests targeting
dev: build only; no post-processing; no publish. - Pushes to
mainanddev: build + post-process, then publish to Vercel artifact branches. - Annotated tags on
main(e.g.,vX.Y.Z): build + post-process, then publish to GitHub Pages. - Release metadata for
CITATION.cffis prepared explicitly during release prep (npm run release:prepare), not on everydevpush. citation-checkruns on PRs todev/main; in branch protection,devcurrently requirescheck_citationandpr.
Common job steps:
npm ciwith caching.- Download/cache Calabash + Saxon; set
XMLCALABASH_JARandSAXON_JAR. - Run ODD -> HTML pipeline and asset build.
- Fail if
build/htmlis missing or empty. - Run link hygiene checks on PRs and pushes (skip on tags).
- TODO: schema generation (RNG + XSD)
Post-processing is CI-only and operates on build/html via scripts/postprocess-html.mjs:
- Inject dev/release banners.
- Add
<meta name="robots">as appropriate. - Minify HTML.
- Inject a build info comment (commit/tag) for debugging.
- Generate
robots.txt(mode-dependent). - Generate
sitemap.xmlfor main only frombuild/htmlfile list withhttps://lex-0.org/as the base. - Reference the sitemap in main
robots.txt. - Add canonical URLs for release builds if missing; keep the page path and point to
https://lex-0.org/.... Dev builds omit canonicals to avoid crawler mismatch.
Modes:
main: public; sitemap + indexable.dev: noindex;robots.txtdisallows all; no sitemap.release: noindex;robots.txtdisallows all; no sitemap.
Sitemap flag:
--sitemap=main|dev|noneoverrides the sitemap output for a given mode.--mode=maindefaults to--sitemap=main;--mode=devdefaults to--sitemap=dev;--mode=releasedefaults to--sitemap=none.
Algolia config:
- Index selection is based on hostname (prod vs dev vs local).
mainbuild ->vercel-main(repo root).devbuild ->vercel-dev(repo root).- Tag build ->
gh-pages/releases/<tag>/.
Publishing rules:
- Clean destination branches before copying to avoid stale files.
- Append commits when publishing to
vercel-mainandvercel-dev. - For tags, fail if the release folder already exists.
releases/index.htmlingh-pagesis regenerated on every successful tag publish.
Release builds display a top-of-page banner on every HTML page:
- Latest release: "Current release vX.Y.Z" with link to
lex-0.org. - Older releases: "Historical release" with link to
lex-0.org. - Style is neutral for latest, warning-tinted for older releases.
All release builds are noindexed via <meta name="robots"> and robots.txt.
The CI check enforces that internal links are relative. The check should fail on:
- Absolute internal links like
https://lex-0.org/...in normal page content. - Absolute internal links like
/css/...or/images/....
The check should allow external domains and metadata/canonical URLs.
Use this to validate a deployment:
lex-0.orgserves latestmainbuild via Vercel.dev.lex-0.orgserves latestdevbuild via Vercel.lex-0.org/releases/vX.Y.Z/loads via Vercel rewrite with no redirect.- Assets for releases resolve correctly and stay on
lex-0.org. - Dev and release builds are noindexed.
- Missing assets in releases: check for absolute paths in
build/html. - Release content not updating: verify tag workflow ran and
gh-pagespublish succeeded. dev.lex-0.orgindexed: confirmrobots.txtand<meta name="robots">in dev output.- Release pages redirect to
github.io: check Vercel rewrite and ensure relative links.
For practical, step-by-step instructions on publishing dev/prod and release builds, see git-workflow.md.