Run tests and deploy in one Gitea Actions job
Test and deploy / test-and-deploy (pull_request) Successful in 2m25s

Two jobs meant checking out, setting up Node and running npm ci (and in the
frontend the build) twice, about two minutes each, because every job starts
in a fresh container. Now one job tests and, for pushes to master only,
deploys. The push-to-master condition is spelled out on every deploy step
instead of an env flag compared to 'true', which would skip the deploy
silently and stay green if the boolean were rendered differently. A failed
test still stops the deploy (an if: without a status function implies
success()).

Docs: the one-job layout, and that Jenkins deployed as root - files it left
in an app folder must be chowned to the subscription user before the first
Gitea deploy (hit on the API).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
PaddyandClaude Opus 5.5 committed 2026-11-08 22:51:26 +01:00
1 parent 689a485fce
commit b22e89001a
3 files changed
+34 -29

No files matched your search

+9
View File
@@ -62,6 +62,15 @@ Collected during the rewrite (September 2026); the progress log in
an `ssh host 'cmd'` never runs, exit 255). The deploy user uses plain `/bin/bash` instead.
- **SSH is on port 42069**, not 22 (22 is closed); the deploy user is `plesk-nachklang`, not
`nachklang`.
- **Jenkins deployed as root.** Files it copied into an app folder belong to `root:root`, so the
first Gitea deploy (as `plesk-nachklang`) fails with rsync "Operation not permitted" / "Permission
denied". Before switching an app, run `find . ! -user plesk-nachklang` in its folder and
`chown -R plesk-nachklang:psacln` what it lists (hit on the API, 2026-11-08; the calendar folder
only held files directly in a folder the user owned, so deleting them worked).
- **Every Gitea Actions job starts in a fresh container.** Splitting test and deploy into two jobs
repeats checkout, Node setup and `npm ci` (and here the build); one job with the deploy steps
conditioned on push-to-master is faster. Spell the condition out on each step instead of comparing
an env flag to `'true'` - a mismatch there skips the deploy silently and the run stays green.
- **Disable the Jenkins job before merging to master**, or it runs `ng build` on the next push.
## shadcn / Base UI