chore(ops): SSG full rebuild nightly after backup, not on every deploy - #697
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 inputrebuild_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).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_ssgis empty → steps skipped.Rollback
Revert.
🤖 Generated with Claude Code