4 Commits

Author SHA1 Message Date
ab6dabd542 fix(ci): correct image digest separator
Some checks failed
CI / ci (push) Has been cancelled
Deploy / deploy (push) Has been cancelled
2026-04-30 12:20:26 +02:00
ba4d3fc89d ci: digest-pin runner-image v0.1.0
Some checks failed
CI / ci (push) Failing after 0s
Deploy / deploy (push) Failing after 0s
2026-04-30 12:17:45 +02:00
bf20e9d39e ci: update runner-image + repo path to public/ namespace
Some checks failed
CI / ci (push) Failing after 1s
Deploy / deploy (push) Failing after 1s
Repos moved to public/ on Gitea: public/runner-image (CI image)
and public/code-crispies (this repo). Updates workflow image refs,
spec hyperlinks, README, and compose tags.
2026-04-30 11:54:06 +02:00
4762952822 ci(deploy): Gitea-driven build/push/deploy for netcup (#14)
Replaces the GitHub Pages workflow with a Gitea Actions pipeline that publishes the cc image to `git.librete.ch/libretech/code-crispies` and ssh-deploys it to `/srv/cc` on netcup.

## Changes
- `.gitea/workflows/ci.yml` — npm test + sanity build (with placeholder VITE_*) on every push / PR.
- `.gitea/workflows/deploy.yml` — single-job build → push → ssh-deploy → /healthz check, gated on `vars.DEPLOY_ENABLED`. Tag push → `:vX.Y.Z` + `:latest`; main push → `:main` + `:sha-<7>`.
- `compose.yaml` — adds `image: ${CC_IMAGE:-cc:local}` so production pulls the published tag while dev still builds locally.
- Both workflows pin `git.librete.ch/libretech/runner-image:v1` (no third-party Docker Hub images, no `--user root`).

## Operator follow-up (before merging into hot deploy)
- Set repo secrets at `https://git.librete.ch/libretech/code-crispies/settings/actions/secrets`:
  - `REGISTRY=git.librete.ch`
  - `REGISTRY_USER=libretech` (user-namespace packages — bot can't push)
  - `REGISTRY_PASS=<libretech package PAT>` (same PAT used for `libretech/runner-image`)
  - `DEPLOY_HOST=root@cloud.librete.ch`
  - `DEPLOY_KEY=<bot deploy private key>` (same key as librenotes deploy)
  - `DEPLOY_PATH=/srv/cc`
  - `HEALTH_URL=https://cc.cloud.librete.ch/`
  - `VITE_SUPABASE_URL=https://yretixuyfuiresnrjkbs.supabase.co`
  - `VITE_SUPABASE_ANON_KEY=<the anon key>` (public-by-design supabase key)
- Set repo variable `DEPLOY_ENABLED=true` once the secrets are in.
- Add `CC_IMAGE=git.librete.ch/libretech/code-crispies:main` to `/srv/cc/.env` on netcup (no rebuild on host).

## Verification
- `yq -e .` parses both workflow YAMLs.
- `docker compose config` resolves cleanly in both build mode (no `CC_IMAGE`) and image-pull mode (`CC_IMAGE=test:1`).
- `npm test` is the same script the previous github-pages workflow ran.

Reviewed-on: libretech/code-crispies#14
Co-authored-by: Michael Czechowski <mail@dailysh.it>
Co-committed-by: Michael Czechowski <mail@dailysh.it>
2026-04-29 17:28:18 +02:00