Deploy with Gitea Actions instead of Jenkins
Tests every push and pull request (lint, typecheck, Vitest, production build); pushes to master build the standalone bundle in the runner and rsync it over SSH as the subscription user into the subdomain's Plesk folder, then restart Passenger via tmp/restart.txt. No mounted host paths; rsync --delete leaves tmp/ and .well-known/ alone. Optional smoke test once DEPLOY_SMOKE_URL is set. Setup (deploy key, pinned host key, Gitea secrets and variables, Plesk Node.js settings) and the switchover order are in docs/deployment.md. Checked locally with actionlint and against a throwaway SSH server, which also caught "~" in the rsync -e string resolving to the wrong home. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
5 files changed
+285
-54
No files matched your search
@@ -401,6 +401,20 @@ Next; README links the docs. Deployment prep: standalone output doesn't serve `.
|
||||
own, so `postbuild` now copies it; verified by running `.next/standalone/server.js` on :4300
|
||||
(styled page, CSS/JS 200, `/admin` redirect).
|
||||
|
||||
**Deploy via Gitea Actions - prepared 2026-11-08 (uncommitted).** Replaces the Jenkins job
|
||||
(`npm ci`, `ng build`, `cp` into the webroot through a shared path, commit status via curl).
|
||||
Decisions with the user: build in the runner and deliver over SSH/rsync as the subscription user
|
||||
`nachklang` (option B; no mounted host paths, no containerised app for performance reasons); no
|
||||
release folders, rsync straight into the app root, rollback = redeploy; app root = the folder Plesk created for the subdomain (user: don't touch Plesk's layout), so `--delete` excludes `tmp/` and `.well-known/`; API workflow later.
|
||||
`.gitea/workflows/deploy.yml` follows the Buddygotchi workflow's shape (test job on every push/PR,
|
||||
deploy job on master, `ubuntu-latest` runner image). Facts from the user: runner is a Docker
|
||||
container on the same server, Passenger has Node 26.13.0, SSH for `nachklang` is currently
|
||||
"Forbidden". Verified locally: actionlint clean; the deploy steps against a throwaway SSH server
|
||||
(including stale-file removal, `tmp/` kept, wrong host key aborts). The dry run found the
|
||||
`~`-expansion bug (see gotchas). Setup and switchover order: `docs/deployment.md`.
|
||||
To do after the first real deploy: record what turned out differently in `deployment.md`, and
|
||||
write the procedure into the user's PKM (requested).
|
||||
|
||||
Local test environment (throwaway, nothing points at shared infra):
|
||||
- `podman run -d --name nk-calendar-test -p 3306:3306 -e TZ=Europe/Berlin -e MARIADB_ROOT_PASSWORD=… --tmpfs /var/lib/mysql -v API/docker/init:/docker-entrypoint-initdb.d:ro -v API/sql:/migrations:ro mariadb:11`
|
||||
- in-memory, seeded by the API's own dev scripts, incl. the `dev@nachklang.art` account.
|
||||
|
||||
Reference in new issue
Block a user