Skip to content

chore(ops): SSG full rebuild nightly after backup, not on every deploy - #697

Merged
mrviduus merged 1 commit into
mainfrom
chore/ssg-nightly-not-on-deploy
Oct 4, 2026
Merged

mrviduus merged 1 commit into
mainfrom
chore/ssg-nightly-not-on-deploy

Conversation

@mrviduus

@mrviduus mrviduus commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Why

Every deploy queued a full SSG rebuild (~2000 routes, ~25 min of Puppeteer on the prod box) and waited up to 40 min for it, holding the only self-hosted runner — deploys took 35–50 min and blocked backups.

Not needed per deploy: the "Snapshot SSG dir + referenced assets" step already keeps the old SSG tree and the assets it references, so crawlers keep complete pages after a release; publishing a book already rebuilds that book.

What

  • deploy.yml: "Queue SSG rebuild" and "Wait for SSG rebuild" run only with the new manual input rebuild_ssg (for releases that change SEO rendering). "Validate SSG content" still runs on every deploy against the kept tree.
  • backup.yml: new last-but-one step queues the full rebuild nightly after the backup (if: always()).
  • health-check.yml: SSG staleness alarm 72h → 36h (nightly cadence; one missed night alarms).
  • CLAUDE.md updated.

Trade-off

After a frontend release, crawlers see the previous rendering until the night (≤ ~24h). Content is identical.

Verified

action-validator on all three workflows. On push events inputs.rebuild_ssg is empty → steps skipped.

Rollback

Revert.

🤖 Generated with Claude Code

Deploy kept the old tree + its assets already; the per-deploy rebuild was ~25 min of
Puppeteer holding the only runner. Manual deploy input rebuild_ssg for SEO-rendering
releases. Health check SSG staleness 72h -> 36h to match the nightly cadence.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@mrviduus
mrviduus merged commit c5f6ee4 into main Oct 4, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant