feat: add GitHub Actions CI and support hosting under a subpath

Mirrors the GitLab pipeline — typecheck, tests, feed sanity — and adds a
Pages deploy.

Pages serves from /<repo>/, and the app used absolute asset paths, so that
job would have shipped a site that 404s on everything. Assets now resolve
against a <base href> the build substitutes, the feed URL resolves against
document.baseURI so deep links work too, and the service worker derives its
paths from its own registration scope. Root-hosted builds are unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
Lucas Winther
2026-08-15 01:22:22 +02:00
co-authored by Claude Opus 5
parent 517066dc65
commit b86794a62d
8 changed files with 173 additions and 17 deletions
+1 -1
View File
@@ -11,7 +11,7 @@
"build:js": "bun build src/client/main.tsx --outfile public/main.js --minify",
"build": "bun run build:feed && bun run build:css && bun run build:js && bun run build:static",
"dev": "bun run build && bun run serve.ts",
"build:static": "cp index.html public/index.html && cp src/client/sw.js public/sw.js && cp src/client/manifest.webmanifest public/manifest.webmanifest && cp src/client/icon.svg public/icon.svg",
"build:static": "mkdir -p public && sed \"s|__BASE__|${BASE_PATH:-/}|g\" index.html > public/index.html && cp src/client/sw.js public/sw.js && cp src/client/manifest.webmanifest public/manifest.webmanifest && cp src/client/icon.svg public/icon.svg",
"serve": "bun run serve.ts"
},
"dependencies": {