Skip to content

docs(deployment): rewrite as a four-step path, not a tour of design choices - #58

Merged
agjs merged 2 commits into
mainfrom
docs/deployment-step-by-step
May 30, 2026
Merged

docs(deployment): rewrite as a four-step path, not a tour of design choices#58
agjs merged 2 commits into
mainfrom
docs/deployment-step-by-step

Conversation

@agjs

@agjs agjs commented May 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Old page led with "Design choices", "Mental model", and a SignalGrid before the actual steps. Operators don't read novels — they scan for the path to a working site.

New shape — four numbered steps, then day-2 / rollback / related:

  1. Accounts (Cloudflare, Hetzner, GitHub, 1Password) as a 4-row table
  2. Secrets into 1Password — generate locally, mint provider tokens, stash in a `Production` vault with a concrete layout. Opinionated on 1Password as the canonical recommendation; alternatives in one line.
  3. Provision via OpenTofu (recommended) OR manual SSH path
  4. Verify with three concrete `curl` / `openssl` commands

Then: day-2 deploys, rollback, related.

Cut (still available elsewhere, linked):

  • "Design choices" FAQ → `/architecture/decisions/`
  • "Boot-time guardrails" FAQ → validator emits its own errors at boot
  • "Image update strategy" → `/runbooks/image-updates/`
  • "Provider notes" → `/topics/provisioning-with-tofu/`
  • "Where to scale up" → out of scope for first deploy

302 → 188 lines (-38%).

Test plan

  • `apps/docs` builds (67 pages, no broken links)
  • Pre-push smoke gate green

…hoices

The old page led with "Design choices", "Mental model", and a SignalGrid
before getting to the actual prep work. Operators don't want a tour;
they want to follow numbered steps to a working site.

New shape — four numbered sections, then day-2 / rollback / related:

  1. Accounts (Cloudflare, Hetzner, GitHub, 1Password) as a 4-row table
  2. Secrets into 1Password — generate locally, mint provider tokens,
     stash everything in a "Production" vault with a concrete layout
  3. Provision via OpenTofu (a) OR manual (b)
  4. Verify with three concrete curls

The opinionated bits are stated, not philosophised. 1Password is the
canonical recommendation (alternatives mentioned in one line); the
vault layout is shown; CLI snippet for the random-string items.

MFA_ENCRYPTION_KEY's non-rotatable nature gets a callout where it
matters (during generation), not buried in a "guardrails" FAQ.

What got cut from this page (still available, just elsewhere):
  - "Design choices" FAQ → already covered in /architecture/decisions/
  - "Boot-time guardrails" FAQ → the validator emits its own errors;
    the page doesn't need to pre-enumerate them
  - "Image update strategy" → links to existing /runbooks/image-updates/
  - "Provider notes" → links to /topics/provisioning-with-tofu/
  - "Where to scale up" → out of scope for first deploy

Total: 302 → 188 lines (-38%). Build clean, no broken links.
@agjs
agjs enabled auto-merge (squash) May 30, 2026 09:57
@agjs
agjs disabled auto-merge May 30, 2026 10:18
@agjs
agjs merged commit 98b8902 into main May 30, 2026
23 checks passed
@agjs
agjs deleted the docs/deployment-step-by-step branch May 30, 2026 10:18
agjs added a commit that referenced this pull request May 30, 2026
…#59)

`register → login → /me through the full stack` is a required check in
branch protection on `main`. The smoke workflow had a `paths:` filter
on its `pull_request:` trigger that excluded docs-only PRs entirely —
so for docs PRs the workflow never ran, never reported a status, and
branch protection blocked merge forever. PR #58 hit this and had to
land via admin override.

The job body already uses dorny/paths-filter and gates every real step
on `if: steps.filter.outputs.code == 'true'`. So removing the trigger-
level `paths:` doesn't waste runner time on docs PRs — they execute
just the checkout + filter (~30s) and exit success with the required
check name reported green. The expensive smoke loop (compose up,
Playwright) only runs when code paths actually change.

Keeping the `push:` paths filter as-is: we don't want every docs commit
on main to fire the smoke loop.
agjs added a commit that referenced this pull request May 30, 2026
…Rs (#61)

dorny/paths-filter standalone negation patterns (`'!apps/api/**/*.md'`
and the like) don't behave like exclude-from-include rules — they
evaluate to true for ANY changed file that doesn't fit the inverse
pattern. Net effect: on a docs-only PR with no code touched, the
`code` filter still returned `true` because a docs `.mdx` file
doesn't match `apps/api/**/*.md`, so the negation "matched".

Concrete evidence: PR #58 (only changed `apps/docs/.../deployment.mdx`).
Every step in `apps-api-ci.yml`'s `validate` job ran — checkout,
filter, Bun, install, db migrations, full test suite, coverage,
production bundle. The buggy negation set `Filter code = true`, the
internal `if: steps.filter.outputs.code == 'true'` gates all
short-circuited to "run", and we hit a unit-test flake on a PR that
touched zero application code.

Removed the negation lines from all 10 affected workflows. The filter
now matches strictly on the positive paths (`apps/api/**`, `apps/ui/**`,
etc. + the workflow file itself). Trade-off: a `README.md` change
inside `apps/api/` will now trigger api-ci. That's acceptable — those
changes are rare, and the previous "fast-skip" optimisation wasn't
actually working anyway. Net effect on docs-only PRs: api-ci,
ui-validate, smoke, bootstrap-validate, validate-compose, and the
security workflows all now correctly skip-with-success in ~30 s
instead of running their full pipelines.

Files touched (10 workflows, 22 lines deleted):
  apps-api-ci.yml
  apps-api-security-{deps,sast,secrets}.yml
  apps-ui-security-{deps,sast,secrets}.yml
  apps-ui-validate.yml
  infra-bootstrap-validate.yml
  infra-compose-full-stack-smoke.yml
  infra-compose-validate-compose.yml  (3 filter blocks)

This PR self-verifies: it's workflow-only, so the `code` filter on
every affected workflow should now correctly evaluate to `false` on
this PR (no apps/api, apps/ui, infra/* changes), and the heavy jobs
should report quick green via skip-with-success. If you see Bun
install + full test suite running on this PR, the fix is wrong.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant