Repository navigation
bl apps: deploy a static site directory with --dir - #51
Merged
nathan-thillairajah merged 3 commits intoNov 17, 2026
Merged
Conversation
`bl apps deploy APP_ID --dir dist` packages a built static site as a Hot Pod static artifact and uploads it, so callers no longer write a manifest or tarball by hand. `--spa` selects index.html fallback for unknown paths. Packaging writes the static manifest, places files under public/, skips macOS metadata and .git, refuses symlinks, and produces identical bytes for an unchanged directory. The deploy response gains `packaged_site`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonwinton
approved these changes
Nov 16, 2026
Address review on block#51: - Skip `.env*`/`.envrc` files and `node_modules/`, so `--dir .` on a project doesn't publish secrets or dependencies to every viewer. - Skip `.git` whatever its type; it is a file in worktrees and submodules. - Match skip names before rejecting symlinks, so a symlinked `node_modules` is skipped instead of failing the deploy. - Count the manifest and `public/` entry against the validator's entry and byte limits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nathan-thillairajah
previously approved these changes
Nov 16, 2026
The required deploy-source group made clap print it before APP_ID, while parsing expects APP_ID first. Agents that copy syntax from --help would swap the arguments. Also say that the static profile requirement applies to --dir deploys only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nathan-thillairajah
approved these changes
Nov 16, 2026
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
To publish a static site today, the caller writes
hotpod.manifest.json, moves the build intopublic/, and creates a tarball. macOStaralso adds._*AppleDouble files, which the platform's static validation rejects. Agents and wrapper tools have to get every step right before they can deploy plain build output such asdist/.What changes
bl apps deploy APP_ID --dir DIRpackages a built site and deploys it.DIRmust haveindex.htmlat its root.--spasetsnot_found_handling: "spa". Without it, unknown paths return 404.packaged_sitewith the file count, content and archive sizes, and the skipped paths.--dirconflicts with it, and with--spawhen a tarball is given.How
The new
src/bl/static_site.rsbuilds the artifact in a temporary file:root: public) and puts the files underpublic/..DS_Store,._*,.git/and__MACOSX/.DIRcontainshotpod.manifest.json(an artifact directory, not a site) or has no rootindex.html.Packaging and directory errors happen before authentication or network calls.
It adds the
tarcrate (no default features) and movestempfilefrom a dev-dependency to a dependency.flate2was already in the lockfile.Testing
index.html;--dir --spauploadsartifact.tar.gzwith the expected manifest and entries, and reportspackaged_site;index.htmlfails without auth or network requests;just lintandjust testpass.bl apps deploy <app> --dir build/public --jsonon a bb-block staging static app. The CLI skipped.DS_Store, the server validated the 5-file artifact, and the version went active.🤖 Generated with Claude Code