Commit Graph

15 Commits

Author SHA1 Message Date
TerryM
5724d2b08c ci: simplify runner disk resize check
Some checks failed
Deploy to Frontend Servers / deploy (push) Failing after 2s
2026-06-09 01:10:32 +08:00
TerryM
6aaa9573e7 ci(deploy): wipe every non-current act workspace before npm ci
Some checks failed
Deploy to Frontend Servers / deploy (push) Failing after 2s
The previous run still hit ENOSPC, this time during `npm ci` while
extracting node_modules. The earlier cleanup left the just-failed act
workspace on disk (mtime < 10min threshold), and its half-extracted
node_modules took the runner past the limit before `npm ci` finished.

- Drop the mtime threshold for act workspaces; instead detect the
  currently-running job's directory and rm -rf every sibling. The
  current job is preserved by path comparison so we never delete files
  the running step needs.
- Blow away ~/.npm/_cacache, ~/.npm/_logs, ~/.cache/setup-node entirely.
  `npm ci` re-populates what it needs and the cache is the easiest GB
  to reclaim on a tight runner.
- Tighten actions-runner workspace retention from 24h to 30min.
- Drop the docker prune --filter; use `docker system prune -af --volumes`
  to reclaim builder cache and volumes too.
- Hard-fail with a clear error if <3.5GB free after cleanup, instead of
  letting `npm ci` half-write an unusable node_modules and failing
  obscurely. Codebase needs ~3GB for hoisted deps.
2026-06-08 00:39:31 +08:00
TerryM
8c1dd8189e ci(deploy): make runner cleanup more aggressive to prevent ENOSPC
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 1m0s
A previous deploy failed at the vite chunk-writing stage with
"ENOSPC: no space left on device". The cleanup step ran at the start
of the job but left enough stale data behind that the runner filled up
before `npm run build` could finish.

- Drop the act workspace retention from 60min to 10min. Closely-spaced
  pushes used to keep multiple stale jobs around; 10min still preserves
  any currently-running job because its mtime keeps advancing.
- Drop _work / setup-node / npm cacache retention from 24h to 60min.
- Drop the `until=24h` filter on docker prune so dangling images,
  containers, and builder cache get reclaimed every run.
- Add a second "Ensure free space before build" guard right before the
  Build step. If <3GB is free, aggressively prune act caches, npm
  cacache, and docker volumes before vite starts writing chunks.
2026-06-07 19:59:18 +08:00
TerryM
49380dc5ed ci(staging): revert act cache wipe, keep other aggressive cleanup
Some checks failed
Deploy Staging (terry-wallet-login) / deploy (push) Failing after 46s
Previous attempt deleted the in-flight act workspace and broke
actions/checkout. Restore the safe >60min sweep for ~/.cache/act
while keeping npm/docker/tmp/log cleanup aggressive.
2026-06-03 02:18:29 +08:00
TerryM
42b25b9e09 ci(staging): aggressive disk cleanup to prevent ENOSPC during npm ci
Some checks failed
Deploy Staging (terry-wallet-login) / deploy (push) Failing after 2s
- wipe all stale act workspaces (keep only current run's dir)
- clear ~/.npm/_cacache and setup-node cache fully
- docker system prune -af --volumes
- apt/yum cache clean, journald vacuum to 100M
- /tmp older than 30min instead of 120min
2026-06-03 02:11:26 +08:00
TerryM
966663f3d7 ci: add staging deploy workflow for terry-wallet-login
Some checks failed
Deploy Staging (terry-wallet-login) / deploy (push) Failing after 24s
- trigger on push to terry-wallet-login
- deploys to staging server via STAGING_* secrets
- rsync to /var/www/ark-library-staging/, sha256 verify
2026-06-03 01:57:56 +08:00
TerryM
b370bf756c ci: free disk space on self-hosted runner before each job
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 33s
Add a pre-checkout cleanup step that removes stale act caches,
old setup-node/npm cache entries, dangling docker resources, and
leftover /tmp files older than 2h. Prevents recurring ENOSPC
failures on the EC2 self-hosted runner.

Note: the very first run after this change may still fail if the
runner disk was already at 100% beforehand; one-time manual cleanup
on the host is required to bootstrap.
2026-05-30 00:10:39 +08:00
TerryM
31b7d53b69 Update deploy.yml 2026-05-26 15:26:40 +08:00
3f0a9f72d9 1
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 48s
2026-05-24 00:31:42 +08:00
769087ba4a Route same-origin API via /apnew/api to bypass ALB /api* rule.
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 53s
ALB sends /api/* to an unreachable backend target group (502 on apex).
Use VITE_API_PREFIX=/apnew with nginx proxy to backend-1 until the listener rule is removed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-23 17:56:38 +08:00
2c710e2e24 Same-origin API: empty VITE_API_URL with nginx proxy to backend-1.
Frontends call /api/ on ark-library.com; nginx forwards internally to 100.93.205.19.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-23 17:42:59 +08:00
TerryM
5b67279734 ci: pin node for jsdom tests
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 1m28s
2026-05-16 21:12:48 +08:00
TerryM
a29ec8ed92 test: add frontend test suite
Some checks failed
Deploy to Frontend Servers / deploy (push) Failing after 43s
2026-05-16 18:21:37 +08:00
terry
9eba9f38a9 Update .gitea/workflows/deploy.yml
Some checks failed
Deploy to Frontend Servers / deploy (push) Failing after 38s
2026-05-16 09:56:12 +00:00
terry
1609408059 ci: add deploy workflow
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 1m0s
2026-05-16 08:27:27 +00:00