emma-hermes/skills/devops/static-html-site-publishing/references/hermesadmin-formal-public-p...

1.9 KiB

Hermesadmin formal public-path publishing

Use this pattern when the user wants existing local/shared-drive HTML files published under the formal Bremen domain instead of a temporary preview host.

When to prefer this

  • The user explicitly wants a https://hermesadmin.bremen.com.tw/ URL.
  • The machine already runs the Bremen cloudflared tunnel and the canonical domain is available.
  • The deliverable is a small static HTML bundle that can live behind a path prefix.

Preferred flow

  1. Stage a writable copy of the HTML files under a local deploy root, preserving source files on shared drives.
  2. Add a small landing index.html when there are multiple pages.
  3. Serve the staged directory from a dedicated local static port.
  4. Add a path-specific cloudflared ingress rule on hermesadmin.bremen.com.tw that points only that prefix to the static port.
  5. Reload the managed cloudflared service and verify the public HTTPS URL, not just the local port.
  6. If the share should expire, create a one-shot cleanup job that removes both:
    • the staged site directory
    • the corresponding ingress rule Then reload cloudflared again.

Why this beats temporary preview URLs

  • Keeps the share on the canonical Bremen domain.
  • Matches the user's expectation for production-like links.
  • Avoids handing out workers.dev, trycloudflare.com, or other temporary third-party hostnames when the formal domain is already available.

Verification checklist

  • Public URL starts with https://hermesadmin.bremen.com.tw/
  • Homepage returns 200
  • Each primary HTML page returns 200
  • <title> or equivalent page identity matches the intended artifact
  • Expiry/down-take mechanism is scheduled when requested

Pitfall

Do not default to Cloudflare temporary preview deployments or quick tunnels when the canonical hermesadmin.bremen.com.tw path-routing infrastructure is already present and the user asked for a formal share URL.