chore: align nanodrop deploy workflow with inventory canonical #5
Reference in New Issue
Block a user
Delete Branch "chore/align-deploy-yaml-with-inventory"
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?
Closes the last open bullet of the cross-project deploy-alignment chore in
~/bugs.md. authd (PR #10), movement (PR #14), and buchinese (direct user commits to main) are already aligned. nanodrop is the final project.What changed
.github/workflows/deploy-homelab.yml→.github/workflows/deploy.yml(rename to match canonical filename).name:→"Deploy to birb co. production"(matches inventory verbatim).docker-compose.yml→compose.yaml(disk rename so the workflow'scompose -f compose.yamlinvocations work).Validate required secretsstep matching inventory canonical (validatesSSH_PRIVATE_KEY+JWT_SECRETonly — vars are not validated, mirroring authd/movement precedent).<< 'EOF'to<< EOF(matches canonical; functionally a no-op for nanodrop since the body has no bash$VARrefs, only GitHub Actions${{ ... }}interpolations).'${{ ... }}') per canonical pattern.TRUST_PROXY=true,COOKIE_SECURE=truepreserved as literals — they are env values, not secrets, per the bug-item directive), then vars.# docker-compose.yml override→# compose.yaml override).The diff vs
~/inventory/.github/workflows/deploy.ymlis now confined to the env-var block (validate list + export list), as the chore allows.Security
None. The diff is a workflow rename/alignment with no application-code change. Reviewed against the mandatory security audit class list:
${VAR:?msg}no-op).$VARreferences (only${{ ... }}rendered at YAML time).Tests
npm run buildclean (tsc --noEmit).npm test— 125/125 vitest specs green across 18 files.deploy.ymlclean.docker-compose.ymlanddeploy-homelabreturns zero stale references after the rename.Manual deploy verification (post-merge, user)
The bug-fixer cannot trigger a real production deploy. After merge, manually verify the workflow runs end-to-end:
main(or click "Run workflow") triggers the workflow.Validate required secretsshould pass (bothSSH_PRIVATE_KEYandJWT_SECRETare already configured).compose.yamlup.Closes
Final bullet of the cross-project deploy-alignment chore. After merge, all four projects (authd, movement, buchinese, nanodrop) are aligned with
~/inventory/.github/workflows/deploy.yml; the bug item can be wrapped resolved.Brings nanodrop into parity with ~/inventory/.github/workflows/deploy.yml, the cross-project canonical: - Rename .github/workflows/deploy-homelab.yml -> deploy.yml - Update workflow name to "Deploy to birb co. production" - Add validate-secrets gate (SSH_PRIVATE_KEY, JWT_SECRET) using ${VAR:?msg} no-op expansion (does not echo secret values) - Switch deploy heredoc from << 'EOF' (quoted) to << EOF (unquoted) to match canonical; functional no-op since the body contains no bash $VAR refs, only GitHub Actions ${{ ... }} interpolations - Single-quote the right-hand side of interpolated export values to prevent shell-metacharacter re-interpretation server-side - Reorder exports: secret first, then hardcoded literals, then vars - Rename docker-compose.yml -> compose.yaml (pure rename) and update the workflow's compose invocations to reference compose.yaml - Update one README example to match the new compose filename The env-var block remains nanodrop-specific (JWT_SECRET + TRUST_PROXY/COOKIE_SECURE literals + PORT/BASE_URL/MAX_FILE_SIZE); that delta is allowed by the bug spec. No app-code changes. Build and tests green. Manual deploy verification (push to main / "Run workflow" -> hit the deployed instance, log in, upload a test file, confirm share link) is the user's job post-merge.