Build Locally, Publish Deliberately#

Document record

Version: 0.4.0 | Date: 24.07.2026 | Time: 17:10 | GlobalID: 20260724_1710_AI_Harness_Deployment_v0.4.0

Last Updated: 24.07.2026 15:10

Framework: ai-quickstart_Documentation

Status: wip

Origin Domain: haluszka.com

Git: Repo: ai-quickstart | Branch: main | Path: docs/guide/deployment.md | Commit: pending

Tag block: #sphinx #deployment #haluszka_com

Local build#

From the repository root:

.\.venv\Scripts\python.exe scripts\build_docs.py --mode plain

Open docs/_build/html/index.html and inspect navigation, source links, code blocks, and the local session. Sphinx generates static HTML, so building and hosting can remain separate (Sphinx documentation).

Public export#

The public subtree is produced deterministically from the full build:

.\.venv\Scripts\python.exe scripts\export_public_site.py

The script replaces docs/_build/public-ai-harness-quickstart/ with an explicit allowlist (guide/, artifacts/, _static/, _downloads/, _images/, and the root redirect page) and reports the copied file count and byte size. It also writes docs/_build/legacy-ai-quickstart-redirects/: one redirect stub per exported page, so every old /ai-quickstart/... deep link forwards to the same page under /ai-harness-quickstart/.

Two earned lessons are encoded in the script:

  • _downloads/ must ship. Sphinx rewrites file-download links (for example the minimal-harness ZIP) to hashed paths below _downloads/. A hand-copied public tree without that folder produces dead download links.

  • The search index must not ship. searchindex.js contains full text of all built pages, including internal ones, and would leak internal content into the public artifact. The same applies to the generated knowledge projection under _static/knowledge/, which the export skips for the same reason.

Publication contract#

Deployment is not part of the tutorial runtime. The tutorial teaches the AI harness locally; publication is an operator workflow that happens after the content has been reviewed.

Publish only the public learning guide, not the complete internal working tree. The generated Sphinx output may contain internal artifacts, handover material, research notes, or source references that are useful locally but should not be mirrored blindly to a public web route.

Before publishing, define one of these explicitly:

  • a public Sphinx build profile;

  • an allowlisted public source tree; or

  • a sync script that copies only approved generated paths.

Later publication path#

The proven Kaunertal pattern uses a separate source repository and a static mirror inside the production web repository:

AI_Quickstart/docs/_build/public-ai-harness-quickstart/
    -> haluszka-com-webdev/public/ai-harness-quickstart/
AI_Quickstart/docs/_build/legacy-ai-quickstart-redirects/
    -> haluszka-com-webdev/public/ai-quickstart/   (redirect stubs only)
    -> npm run build
    -> dist/
    -> IONOS Deploy Now

Deployment lessons already earned in WET_Kaunertal:

  • do not modify IONOS-generated workflow files as part of content work;

  • do not invent repository-owned .deploy-now configuration;

  • delete stale mirror files before copying a new approved build;

  • measure the complete dist/ artifact;

  • keep a safety margin below the approximately 50 MB Starter quota; and

  • verify that the live route uses the intended commit.

Publishing is intentionally not part of the local tutorial. A future sync script should resolve both repository roots explicitly, replace only public/ai-harness-quickstart/ and the redirect tree under public/ai-quickstart/, report copied file count and size, and stop before commit or push.

Preflight gates#

Before a public deploy:

  • local Sphinx build succeeds;

  • public scope is explicit and reviewable;

  • docs/_build/, .venv/, caches, and package metadata are not committed;

  • internal artifacts are not copied into the public mirror;

  • generated output size is measured before triggering the host build;

  • headline pages do not contain placeholders or private notes.

Mirror script requirements#

A future sync script should be deterministic and conservative:

  • resolve AI_Quickstart and haluszka-com-webdev as absolute paths;

  • fail if either root does not match the expected repository name;

  • replace only haluszka-com-webdev/public/ai-harness-quickstart/ and the legacy redirect tree haluszka-com-webdev/public/ai-quickstart/;

  • report copied file count and byte size;

  • never touch IONOS-generated deployment configuration;

  • stop before commit, push, or external publish unless explicitly requested.

Known failure modes#

Failure

Cause

Fix

Public route is blank or stale

Wrong mirror folder or stale copied files

Use one explicit mirror target and replace it deterministically

Download links report “no file”

_downloads/ missing from a hand-copied public tree

Export with scripts/export_public_site.py, which includes _downloads/

Deployment exceeds host limit

Full docs or old assets copied into dist/

Measure output and publish only current public assets

Internal work appears online

Full local Sphinx tree was mirrored

Use a public profile or allowlist before copying

Styles or navigation break

Generated files copied without their asset paths

Copy the complete approved HTML build subtree

Updated images stay stale after deploy

Cloudflare caches static assets for four hours; Sphinx only cache-busts CSS/JS, not _images/

Wait out the TTL or purge the Cloudflare cache; verify the origin with a query-string cache buster

IONOS deploy behaves unexpectedly

Provider config edited by hand

Leave generated platform config under provider control

Post-deploy checks#

After publishing:

  • open https://haluszka.com/ai-harness-quickstart/;

  • open https://haluszka.com/ai-quickstart/guide/ and confirm it redirects to the new path;

  • check the guide index, one metaphor page, one lab page, and the source page;

  • confirm the live route reflects the intended commit;

  • record artifact size and any deploy notes in the project log.