Publishing this site
The portal is ordinary source code in the course repository. A deterministic static build renders the guide, diagrams, per-specification pages and search index for Cloudflare Pages.
Local build and preview
cd portal
npm ci
npm run build
npm run check
npm run preview
Open the printed localhost address. Search, navigation, code copying and diagrams work without a hosted application backend. Mermaid and the documentation assets are bundled locally; the published pages do not depend on a diagram CDN.
Branch environments
| Source branch | Cloudflare target | Purpose |
|---|---|---|
| master | dbs-2026005-docs.pages.dev | Reviewed published manual |
| develop | develop.dbs-2026005-docs.pages.dev | Integration documentation |
| Feature branch | Build/check only | Validate the proposal before merging |
The documentation describes intended behavior and explicitly marks planned implementation. A published manual is not proof that the database features are complete.
Automatic publishing on this Mac
The repository provides tools/install_docs_hook.sh. It installs a repository-local pre-push hook; it does not change global Git settings. The hook builds and validates the exact pushed master/develop commit in an isolated temporary directory. A background publisher waits until GitLab reports that commit on the remote branch, then deploys the prebuilt assets. Rejected pushes do not publish. Feature pushes do not publish.
./tools/install_docs_hook.sh
Wrangler uses the developer's existing local Cloudflare login. Each teammate needs their own authorized login to use this local workflow. Deploy logs live under ignored build/docs-publish/; a failed deployment can be retried using the provided publish command. Browser-only merges are not observed by a local push hook.
Hosted GitLab CI
ci/docs.gitlab-ci.yml is a separate build/check/deploy pipeline template. It uses npm's lockfile, publishes only master/develop, serializes deployments per branch, and requires a scoped Cloudflare Pages API token stored as a masked CI variable. Do not commit tokens or copy a broad local OAuth credential into CI.
The current course account is a Developer and cannot change CI settings/variables. The course .gitlab-ci.yml is hash-checked by grading and must remain intact. The repository includes a concrete webhook-driven arrangement in docs/maintainer-setup.md: a separate private automation project uses ci/docs-webhook.gitlab-ci.yml and tools/docs_ci_source.py to build the exact source commit. A Maintainer must approve its runner, job-token read access, trigger and scoped publishing credentials before hosted publishing from both teammates can be claimed active. The template alone does not enable it.
Cloudflare Pages' built-in Git integration does not support self-hosted GitLab such as the campus host; direct upload through Wrangler is the deployment path. See Cloudflare Direct Upload and CI deployment.
Manual recovery
cd portal
npm run build
npm run check
npm run deploy:staging
# Publish production only from a reviewed master commit:
npm run deploy:production
Keep source and output provenance together. For release evidence, record the Git commit and deployment URL. No grading data files, student identity details, credentials, or private scoring images are copied into the public portal.