Add Forgejo Actions workflow to build and deploy on push
Some checks failed
Deploy / build-deploy (push) Failing after 1m0s

- .forgejo/workflows/deploy.yaml: build the wasm bundle on the arch-latest
  Docker runner and rsync it into the bind-mounted web root (/deploy) on
  push to master
- deploy/Caddyfile.example: reference site block with the cross-origin
  isolation headers the WASM runtime requires

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jorijn van der Graaf 2026-07-18 23:27:41 +02:00
commit d3dd4b1f7a
2 changed files with 117 additions and 0 deletions

21
deploy/Caddyfile.example Normal file
View file

@ -0,0 +1,21 @@
# catcrafts.net Caddy site block
#
# The WASM app (Crafter.Graphics) needs a cross-origin-isolated context
# (SharedArrayBuffer / threads), which requires these response headers. They
# are NOT optional — without them the page loads but the runtime fails.
#
# If you already have a `catcrafts.net { ... }` block, you only need to ADD the
# three Cross-Origin-* header lines to it. This file is the complete block for
# reference. Point `root` at the host directory you bind-mount into the runner
# as /deploy (the "-v /path/to/webroot:/deploy" in the runner's config.yaml).
catcrafts.net {
root * /srv/catcrafts.net
header Cross-Origin-Opener-Policy "same-origin"
header Cross-Origin-Embedder-Policy "require-corp"
header Cross-Origin-Resource-Policy "same-origin"
encode zstd gzip
file_server
}