CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

ci(deploy): one-command box deploy + one-tap "Deploy to Box" workflow #4063

Merged⚡ AI-generatedXSccantynz wants to mergeclaude/loving-edison-25o6q3mainopened Jun 12, 2026
ccantynzcommented Jun 12, 2026

Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/AlecRae.com/pull/68


What this adds

Deploying to the production box currently requires someone with a terminal to manually run git pull → bun install → db:migrate → web build → restart units. This PR turns that into:

One command on the box

scripts/box-deploy.sh — the full pull ritual, fail-fast: if migrate or build fails, the services are not restarted and the box keeps serving the previous working build. Ends with health checks on alecrae-api (:4100/health) and alecrae-web (:4200/api/version) and prints the deployed commit. Unit names/ports overridable via ALECRAE_* env vars.

One tap from the iPad

.github/workflows/box-deploy.yml — a manual-only (workflow_dispatch) GitHub Action that SSHes into the box and runs the script. Once the four BOX_* secrets are set (one-time, instructions in the workflow header and runbook), deploying = GitHub → Actions → "Deploy to Box" → Run workflow. No terminal needed.

Production deploys stay Craig-authorized by construction: the workflow can only be triggered manually, and it hard-fails with a clear message until Craig adds the secrets.

Runbook

docs/infra/box-deploy.md — covers the GitHub-button path, the one-liner path, and how to SSH from an iPad (Termius) for the one-time key setup. Also documents how to verify what's live (mail.alecrae.com/api/version vs main).

Verification

  • bash -n scripts/box-deploy.sh ✅ syntax clean
  • bun run docs:check ✅ 51 docs stamped
  • Workflow is inert until secrets exist — merging this changes nothing on the box

https://claude.ai/code/session_0162YN9hcciwvFju6Ead8s2J


Generated by Claude Code

ccantynzcommented Jun 12, 2026

Originally written by @vercel[bot] on GitHub.


Deployment failed with the following error:

There is no GitHub account connected to this Vercel account.
ccantynzcommented Jun 12, 2026

Originally written by @vercel[bot] on GitHub.


The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
alec-rae-com-admin Building Building Preview, Comment Jun 12, 2026 1:41pm

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts