Fix deploy script hanging CI after a successful deploy - #10
Merged
Conversation
The deploy work completed fine (site updated), but the Node process never exited: the puter.js SDK holds an open handle, so main() resolving didn't end the process. The CI step then hung ~6 min until it was cancelled by the next run's concurrency rule (observed on run #29960287886). With no timeout cap, a hang could otherwise run to GitHub's 6-hour default. - Add process.exit(0) on success (process.exit(1) on failure already existed). - Add timeout-minutes: 10 to the deploy job as a defensive cap. Co-Authored-By: Claude Sonnet 5 <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.
Context
Auto-deploy (PR #9) is live and working — the site correctly updated to current
main(verified: nested modules likejs/views/practice.jsserve at 200). But the first runs finished their deploy work and then hung ~6 minutes before being cancelled.Cause
scripts/deploy-puter.mjsnever callsprocess.exit(0)on success. The@heyputer/puter.jsSDK keeps a handle open (socket/timer), so the process doesn't self-terminate whenmain()resolves. The CI step hangs until something ends it — on run #29960287886 that was the next run'scancel-in-progress, which is why it showedcancelleddespite loggingDone. Live at .... With no timeout cap, an isolated hang would run to GitHub's 6-hour default.Fix
process.exit(0)aftermain()resolves (theprocess.exit(1)failure path already existed).timeout-minutes: 10on the deploy job as a defensive backstop.Deploy logic itself is unchanged and already verified end-to-end.
🤖 Generated with Claude Code