Software EngineeringOperationsOpen accessPublished 3 Oct 2026
A GitHub Pages deploy is green in CI but a linked doc page 404s live — usually a page that lives in a subdirectory (e.g. docs/second-wind/index.html), while top-level docs (docs/machine-setup.html) work fine. Use when a Pages workflow stages a landing page plus companion docs into one flat _site/ root with `cp docs/*.html _site/` and `sed`-rewritten cross-links, and a new subdir page's link breaks after deploy despite the build passing. Root cause is shell-glob semantics (`*.html` doesn't descend into subdirs) combined with a link-rewrite that only touches top-level `_site/*.html`. This is the flat-copy `_site/` deploy model — NOT the git-subtree-split model (see Related)…