Deploy strictly from git, not a host checkout #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "orbit-7-deploy-from-git"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
deploy.sh built with
go build .from whatever working tree it ran in, so production depended on one host's checkout (servo). That is precisely how the real source ended up trapped off-git. This makes git the source of truth for deploys.Solution
deploy.sh now clones the canonical remote at a given ref (default
main) into a temp dir, builds linux/amd64 there, deploys, and cleans up. Because it builds from a fresh clone, only committed-and-pushed code can reach production; local/unpushed trees are never deployed. The script is host-independent — runnable from any machine with git, Go, and SSH — and prints the exact deployed SHA.Usage:
./scripts/deploy.sh [host] [git-ref](defaults:fismen,main). The host-managed unit (incl. the OIDC drop-in) is left intact; the embedded unit is only written on a fresh install.Verification
Validated the clone+build path from git end-to-end (no deploy): clones
origin/main, builds the 21.4 MB linux/amd64 binary. Syntax-checked.Follow-ups
Closes #7