From af5a245f72b16452591288e4eca71f295f2cf00d Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Sat, 19 Sep 2026 22:30:15 +0000 Subject: [PATCH] chore(pages): publish the canonical www bundle Publish www/.well-known/ and www/public/ into the built site: * an overlay step before the upload copies them in, without clobbering the generated pages (cp -an) * include-hidden-files: true, without which upload-pages-artifact drops the dot-directory and /.well-known/security.txt is never served * a placeholder homepage only if none exists Measured: this site serves 200 at / but 404 at /.well-known/security.txt because the hidden directory is dropped by the uploader. Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com> --- .github/workflows/casket-pages.yml | 27 +++++++++++++++++++++++++++ www/public/index.html | 21 +++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 www/public/index.html diff --git a/.github/workflows/casket-pages.yml b/.github/workflows/casket-pages.yml index 1ac1da8..81ae96f 100644 --- a/.github/workflows/casket-pages.yml +++ b/.github/workflows/casket-pages.yml @@ -92,11 +92,38 @@ jobs: mkdir -p _site cd .casket-ssg && cabal run casket-ssg -- build ../.site-src ../_site touch ../_site/.nojekyll + - name: Overlay the canonical www bundle + shell: bash + run: | + set -euo pipefail + # Publish the canonical bundle alongside whatever the SSG produced. + # + # www/public/ -> the servable site root, used as a fallback + # www/.well-known/ -> must be reachable at /.well-known/ on this + # origin (RFC 9116, and the RSR check on + # www/.well-known/security.txt) + # + # Everything else under www/ (dns/, policies/, profiles/, runbooks/, + # errors/) is source material and is deliberately NOT published, so + # only these two subtrees are copied rather than all of www/. + mkdir -p _site + # -n (no-clobber): a page the SSG did produce always wins, so the + # bundle can never regress a working site. It only fills the gaps. + if [ -d www/public ]; then + cp -an www/public/. _site/ + fi + if [ -d www/.well-known ]; then + mkdir -p _site/.well-known + cp -a www/.well-known/. _site/.well-known/ + fi + echo "published tree:" + find _site -maxdepth 2 | sort - name: Setup Pages uses: actions/configure-pages@v6.0.0 - name: Upload artifact uses: actions/upload-pages-artifact@v5.0.0 with: + include-hidden-files: true path: '_site' deploy: environment: diff --git a/www/public/index.html b/www/public/index.html new file mode 100644 index 0000000..3efd87f --- /dev/null +++ b/www/public/index.html @@ -0,0 +1,21 @@ + + + + + + Cliodynamics.jl + + + +

Cliodynamics.jl

+

Site in preparation.

+

+ Machine-readable metadata is served from + /.well-known/security.txt. +

+ +