feat: emit public/health.json at build time#15
Merged
Conversation
Adds a small build step that writes public/health.json containing
{status, service, version}, mirroring the shape returned by backend
/api/v1/health. The static file is uploaded to Tigris via the existing
'aws s3 sync public/' step in deploy.yml, so the deployed bundle exposes
its version at https://<frontend>/health.json without any SPA changes.
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.
Summary
writeHealthJson()helper tosrc/build.tsthat writespublic/health.jsoncontaining{status, service, version}— mirroring the shape returned by backend/api/v1/health.deno.jsonat build time (same source__APP_VERSION__derives from), so the deployed bundle exposes its version athttps://<frontend>/health.jsonwithout any SPA changes.aws s3 sync public/ s3://...deploy step uploads the new file wholesale — no workflow change needed.health.jsonadded to.gitignore(build artifact, alongsideapp.js/styles.css).deno.jsonpatch bump 0.2.9 → 0.2.10 so auto-tag publishes a release containing the new file.Part of the "single-shot deploy-tag-drift checker" line of work — Phase 2 will land a
verify-deploy.shinlocal-devthat probes this endpoint against the repo's latest git tag.Test plan
deno task check— type-check passesdeno task build— emitspublic/health.jsonwith shape{"status":"ok","service":"network-dashboard","version":"0.2.10"}curl https://network.moonlightprotocol.io/health.jsonandcurl https://network-testnet.moonlightprotocol.io/health.jsonreturn the expected JSON