Skip to content

GitHub Pages

Rohin Gosling edited this page Jul 21, 2026 · 4 revisions

GitHub Pages Runbook

Status: deployment workflow committed; public deployment awaits publication of the reviewed public tree. Last platform review: 2026-07-21

Target

Build the React and Vite ECA Model Laboratory as static assets and deploy them to the project site at https://rohingosling.github.io/eca-rule-engine/. Bounded model validation executes synchronously at the interface document boundary, while evaluation executes in a browser Web Worker. Version 1 uses no server-side runtime, remote API, persistence service, analytics service, or metered cloud product.

Prerequisites

  • The public GitHub repository contains the reviewed project tree on main.
  • Repository administrators can change Settings → Pages.
  • GitHub Actions is enabled for the repository.
  • The client passes npm ci, npm test, npm run build, and npm run build:pages from apps/client.

Enable GitHub Pages

  1. Open the public repository on GitHub.
  2. Open Settings → Pages.
  3. Under Build and deployment, set Source to GitHub Actions.
  4. Open Actions and run Deploy client to GitHub Pages, or publish a reviewed main commit to trigger it.
  5. Confirm that the github-pages environment reports the production URL.

The repository-owned .github/workflows/deploy-pages.yml workflow installs the locked client dependencies, runs the contract drift gate and TypeScript build, builds with the /eca-rule-engine/ Vite base path, uploads apps/client/dist, and deploys that artifact through the official GitHub Pages actions. No deployment branch or committed build output is required.

Pages settings

Setting Value
Plan GitHub Pages for the public repository
Production branch main
Publishing source GitHub Actions
Workflow .github/workflows/deploy-pages.yml
Application directory apps/client
Build command npm run build:pages
Build output apps/client/dist
Node.js 24
Project base path /eca-rule-engine/
Runtime variables None

Static routing and asset paths

The application currently has no URL router and needs no single-page fallback. Vite rewrites generated asset and worker URLs under /eca-rule-engine/ during build:pages. If route-based deep links are introduced, choose and test a GitHub Pages-compatible routing strategy before publishing them.

A custom domain would move the application to / and therefore requires a corresponding production base-path change. Do not add a custom domain without updating and testing build:pages and this runbook together.

Security-header constraint

GitHub Pages does not expose project-defined HTTP response headers. The production Vite build therefore injects a strict HTML Content Security Policy and no-referrer policy through <meta> elements. The CSP denies network connections, objects, and form submission; restricts scripts, fonts, workers, and images to the static application; and permits inline styles required by the component libraries. JSON Schema validation is generated as static TypeScript during contracts:generate; do not restore AJV runtime compilation, which requires unsafe-eval and violates this policy.

An HTML CSP cannot enforce response-only directives such as frame-ancestors. Record this platform limitation in hosted release evidence instead of claiming response-header parity with a configurable static host. Do not introduce a proxy, CDN account, or hosted function solely to modify headers without a new architecture decision.

Release verification

After deployment:

  1. Load https://rohingosling.github.io/eca-rule-engine/ in a clean browser profile.
  2. Confirm every application asset and the evaluator worker load beneath /eca-rule-engine/.
  3. Confirm the HTML CSP is present and browser developer tools report no policy violations during the core journey.
  4. Verify light, dark, and system themes.
  5. Import the reference model and validate it locally.
  6. Raise reference events and verify selected-action, no-action, ambiguity, and trace behaviour.
  7. Import negative fixtures and verify deterministic diagnostics.
  8. Export the model and compare its canonical JSON with the expected document.
  9. Test keyboard-only operation, 200% zoom, reduced motion, and a narrow viewport.
  10. Inspect network traffic and confirm no model, occurrence, result, or telemetry data leaves the browser.

Pull requests do not receive native per-branch GitHub Pages preview URLs. Review candidate artifacts through the local production preview command and the workflow build gate before merging; run the hosted smoke test after deployment.

Rollback

Republish the last verified private revision through the promotion workflow, replace the public branch with its required single root commit, and allow the Pages workflow to deploy that public revision. Then repeat the hosted smoke and privacy checks.

Platform limits

At the last review, GitHub documented a recommended 1 GiB source repository limit, a 1 GiB published-site limit, a 10-minute deployment timeout, and a soft 100 GiB monthly bandwidth limit. The client remains far below these limits. Recheck the official limits page before a public release because platform allowances can change.

Official references

Clone this wiki locally