5 Commits
Author SHA1 Message Date
grabowski f45adceef0 Bound deploy SSH step to 5m so a hung session fails fast
Deploy to LXC / deploy (push) Successful in 35s
A leftover child process from npm ci/build can keep the SSH
session's file descriptors open even after the remote script
exits, leaving the Action step hanging indefinitely with no
useful signal -- the actual deploy work (build, restart, health
check) normally finishes in well under a minute.
2026-07-01 11:51:59 +07:00
grabowski 193673a9ce Fix flaky deploy health check: poll instead of fixed 2s sleep
Deploy to LXC / deploy (push) Has been cancelled
The service can take longer than 2s to finish starting after
restart (DB pool init, etc), so systemctl is-active would
occasionally still report "activating" at the fixed check point --
CI marked the run failed even though the app came up moments later
and was actually fine. Poll for up to 15s instead, and dump service
status on a real failure so debugging doesn't require SSH access.
2026-07-01 11:44:36 +07:00
grabowskiandClaude Opus 4.6 9a73c60d10 Fix deploy: git checkout before pull, use npm ci
Deploy to LXC / deploy (push) Successful in 19s
Prevents package-lock.json conflicts by resetting local changes
before pulling. Uses npm ci (clean install from lockfile) instead
of npm ci --production=false.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 15:45:48 +07:00
grabowskiandClaude Opus 4.6 c12f727734 Update deploy workflow for private repo with deploy keys
Deploy to LXC / deploy (push) Successful in 19s
Two SSH keys needed:
- DEPLOY_KEY: CI runner → LXC server (SSH access)
- REPO_DEPLOY_KEY: LXC server → Gitea repo (git pull access)

Workflow writes the repo deploy key to ~/.ssh on the server and
configures SSH to use it for git.b4l.co.th. Handles first deploy
(clone) and subsequent deploys (pull) automatically.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 16:26:04 +07:00
grabowskiandClaude Opus 4.6 12a6e9ef0b Add Gitea Actions workflow for auto-deploy to LXC on push
Deploy to LXC / deploy (push) Failing after 6s
SSH-based deploy: git pull, npm ci, build, db:push, systemctl restart.
Secrets configured in Gitea repo settings (DEPLOY_HOST, DEPLOY_USER,
DEPLOY_KEY). Includes setup guide in docs/ci-deploy-setup.md.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 16:07:12 +07:00