Skip to content

Commit 09655dd

Browse files
chore(pages): publish the canonical www bundle, retire the root upload (#104)
The GitHub Pages site was a 404, and two workflows were racing for it while neither could win: casket-pages.yml uploaded the repository root, which contains no index.html at all (and would publish dns/, tls/, security_headers/ and the rest of the repository past the published boundary), while the Ddraig build was not guaranteed to produce a site. * retire casket-pages.yml - the repository root is not a site * the Ddraig build is now best-effort (continue-on-error), so a failed Idris build can no longer stop the repository publishing * add www/public/index.html, a placeholder in the same shape as the one jtv-lang.dev serves, so there is always a servable homepage * overlay the canonical bundle between the build and the upload: www/public/ (no-clobber, so a page the SSG did produce always wins) and www/.well-known/, so /.well-known/security.txt is reachable - RFC 9116, and the RSR check on www/.well-known/security.txt Additive only: nothing the SSG produces is replaced. --- Verified before pushing: the workflow YAML parses, the overlay step sits between the build and the upload, and the overlay script was extracted from the YAML and executed against three cases — SSG produced nothing (placeholder index and `/.well-known/security.txt` both published), SSG produced a real page (not clobbered), and the Jekyll `_site/www` case (bundle source removed). A leak check confirms `dns/` and the other non-published subtrees never reach `_site`. Note: the estate is carrying roughly 3,200 queued Actions runs from earlier mass pushes, so this will not deploy immediately. That is a queue backlog, not a failure of this change.
1 parent a9fa798 commit 09655dd

3 files changed

Lines changed: 59 additions & 45 deletions

File tree

.github/workflows/casket-pages.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/pages.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@ jobs:
2727
repository: hyperpolymath/ddraig-ssg
2828
path: .ddraig-ssg
2929
- name: Compile Ddraig
30+
# Best-effort: a failed Idris build must not stop the repo publishing.
31+
continue-on-error: true
3032
working-directory: .ddraig-ssg
3133
run: idris2 Ddraig.idr -o ddraig
3234
- name: Build site
35+
continue-on-error: true
3336
run: |
3437
mkdir -p src
3538
if [ ! -f src/index.md ] && [ -f README.md ]; then
@@ -38,6 +41,32 @@ jobs:
3841
echo "# ${GITHUB_REPOSITORY}" > src/index.md
3942
fi
4043
./.ddraig-ssg/build/exec/ddraig build src _site https://hyperpolymath.github.io/${GITHUB_REPOSITORY#*/}
44+
- name: Overlay the canonical www bundle
45+
shell: bash
46+
run: |
47+
set -euo pipefail
48+
# Publish the canonical bundle alongside whatever the SSG produced.
49+
#
50+
# www/public/ -> the servable site root, used as a fallback
51+
# www/.well-known/ -> must be reachable at /.well-known/ on this
52+
# origin (RFC 9116, and RSR check
53+
# www/.well-known/security.txt)
54+
#
55+
# Everything else under www/ (dns/, policies/, profiles/, runbooks/,
56+
# errors/) is source material and is deliberately NOT published, so
57+
# only these two subtrees are copied rather than all of www/.
58+
mkdir -p _site
59+
# -n (no-clobber): a page the SSG did produce always wins, so the
60+
# bundle can never regress a working site. It only fills the gaps.
61+
if [ -d www/public ]; then
62+
cp -an www/public/. _site/
63+
fi
64+
if [ -d www/.well-known ]; then
65+
mkdir -p _site/.well-known
66+
cp -a www/.well-known/. _site/.well-known/
67+
fi
68+
echo "published tree:"
69+
find _site -maxdepth 2 | sort
4170
- name: Upload artifact
4271
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5
4372
with:

www/public/index.html

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width,initial-scale=1">
6+
<title>git-reticulator</title>
7+
<style>
8+
:root{color-scheme:light dark}
9+
*{box-sizing:border-box}
10+
body{margin:0;min-height:100vh;display:grid;place-items:center;font:16px/1.6 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;background:#fafafa;color:#111}
11+
@media (prefers-color-scheme:dark){body{background:#0d0d0f;color:#e8e8ea}}
12+
.card{max-width:34rem;padding:2.5rem;text-align:center}
13+
h1{font-size:clamp(2rem,6vw,3.2rem);margin:0 0 .4rem;letter-spacing:-.02em}
14+
.dom{font-family:ui-monospace,monospace;font-size:.85rem;opacity:.5}
15+
p{margin:1.4rem 0 0;opacity:.8}
16+
.tag{display:inline-block;margin-top:1.8rem;padding:.35rem .9rem;border:1px solid currentColor;border-radius:999px;font-size:.8rem;opacity:.55}
17+
footer{margin-top:2.6rem;font-size:.76rem;opacity:.4}
18+
a{color:inherit}
19+
</style>
20+
</head>
21+
<body>
22+
<main class="card">
23+
<h1>git-reticulator</h1>
24+
<div class="dom">hyperpolymath.github.io/git-reticulator</div>
25+
<p>Site in preparation.</p>
26+
<div class="tag">Coming soon</div>
27+
<footer>part of the hyperpolymath estate &middot; <a href="/.well-known/security.txt">security.txt</a></footer>
28+
</main>
29+
</body>
30+
</html>

0 commit comments

Comments
 (0)