Skip to content

feat(deploy): serve alienstudio.com from Workers (v0.0.3) - #9

Merged
sebastienrousseau merged 6 commits into
mainfrom
feat/v0.0.3
Dec 5, 2026
Merged

sebastienrousseau merged 6 commits into
mainfrom
feat/v0.0.3

Conversation

@sebastienrousseau

Copy link
Copy Markdown
Owner

This PR moves alienstudio.com from GitHub Pages to Cloudflare Workers and closes the repo's five open code-scanning alerts.

The site is built with ssg 0.0.77, pinned in mise.toml, and CI now runs axe-core on every page (0 violations).

Highlights ⭐️

  • Served from Workers: pull requests dry-run the config, feat/** branches deploy a workers.dev preview, and main deploys alienstudio.com. Unknown paths answer 404 with the not-found page.
  • Security headers applied: Workers apply ssg's docs/_headers (Pages ignored it), so the site gains nosniff, a referrer policy and frame-ancestors. The pages use only same-origin scripts and styles, and all 19 load with no console errors under it, gallery lightbox included.
  • Code-scanning alerts closed: all five were in unused copies (public/, templates/, the root main.js and index.html), which are removed. The live script, _layouts/main.js, sets no innerHTML.
  • ssg pinned via mise: mise.toml pins ssg 0.0.77. CI fails if the pin is not the latest release or did not build docs/.

What's Changed

Detail:

  • make build writes to public/ (now ignored) and copies it into a fresh docs/, without ssg's build caches (.ssg/, .ssg-cache/), and writes the bare host to CNAME (ssg writes a DNS zone line, which was patched by hand before).
  • Workflows pin actions by commit SHA, persist no credentials and run Node 22.
  • README: Quick Start uses mise install and make build, the build badge points at quality-gate.yml, and a Deployment section is added.

Validation

  • make build (ssg 0.0.77 via mise): clean; page HTML is unchanged, sitemaps change order only.
  • check-ssg-pin.py, check-seo.py, regression-test.py, front matter and contrast checks: pass.
  • axe-core over 19 pages: 0 violations.
  • wrangler dev: pages 200, /about 307 to /about/, unknown paths, /404 and /404/ 404, internal files 404. With _headers applied, Chrome shows no console errors on any page, and the gallery lightbox opens with the right image and count.
  • actionlint: clean.

After merge: the production deploy is checked live, then GitHub Pages is turned off for this repo.

Full Changelog: main...feat/v0.0.3

ssg builds from _layouts/ into docs/; public/, templates/, the root
main.js and the root index.html were older copies nothing read or
served. They held all five open code-scanning alerts (two js/xss-
through-dom, three js/incomplete-multi-character-sanitization). The
live script, _layouts/main.js, sets no innerHTML.

Signed-off-by: Sebastien Rousseau <sebastienrousseau@users.noreply.github.com>
Assisted-by: Claude Code:claude-opus-5-5 [Bash, Read, Edit]
mise.toml pins the generator. scripts/check-ssg-pin.py fails when the
pin is not the latest ssg release or when docs/ was built by another
version (docs/sbom.cdx.json records it).

Signed-off-by: Sebastien Rousseau <sebastienrousseau@users.noreply.github.com>
Assisted-by: Claude Code:claude-opus-5-5 [Bash, Read, Edit]
quality-gate.yml pins checkout, setup-node and setup-python by SHA,
keeps no credentials, moves to Node 22, and adds the ssg pin check and
axe-core on every built page (scripts/a11y-axe.mjs). Verified with
actionlint; axe reports 0 violations on all 19 pages.

Signed-off-by: Sebastien Rousseau <sebastienrousseau@users.noreply.github.com>
Assisted-by: Claude Code:claude-opus-5-5 [Bash, Read, Edit]
Replaces the GitHub Pages workflow with Cloudflare Workers static
assets serving docs/:
- wrangler.jsonc: alienstudio-preview on workers.dev, alienstudio on
  alienstudio.com;
- worker/notFound.js answers unknown paths, /404 and /404/ with the
  404 page and a 404 status;
- deploy-cloudflare.yml dry-runs PRs, previews feat/** pushes and
  deploys main, with actions pinned by SHA and wrangler 4.168.0.

make build now writes to public/ (ignored) and copies it into a fresh
docs/, without ssg's build caches, and writes the bare host to CNAME
(ssg writes a DNS zone line, which was patched by hand before).

ssg's _headers is kept: Workers apply it, and every page loads with no
console errors under it (the pages use only same-origin scripts and
styles), so the site gains nosniff, a referrer policy and
frame-ancestors. Verified with wrangler dev and headless Chrome on all
19 pages, including the gallery lightbox.

Signed-off-by: Sebastien Rousseau <sebastienrousseau@users.noreply.github.com>
Assisted-by: Claude Code:claude-opus-5-5 [Bash, Read, Edit]
Rebuilt with the pinned ssg 0.0.77. Page HTML is unchanged; sitemaps
change order, and ssg's build caches leave docs/.

Signed-off-by: Sebastien Rousseau <sebastienrousseau@users.noreply.github.com>
Assisted-by: Claude Code:claude-opus-5-5 [Bash, Read, Edit]
Signed-off-by: Sebastien Rousseau <sebastienrousseau@users.noreply.github.com>
Assisted-by: Claude Code:claude-opus-5-5 [Bash, Read, Edit]
@sebastienrousseau
sebastienrousseau merged commit a048c05 into main Dec 5, 2026
10 checks passed
@sebastienrousseau
sebastienrousseau deleted the feat/v0.0.3 branch December 5, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant