deploy: skip prod rebuild for docs/tooling-only merges #67

Closed
opened 2026-06-21 13:39:34 +00:00 by gertjan · 0 comments
Owner

Problem

Every merge to main runs the deploy job, which does docker compose build --no-cache && up -d for all containers. Doc/tooling-only changes (e.g. CLAUDE.md, scripts/**) therefore trigger a full no-cache rebuild + restart of production despite no runtime code change. Wasteful and causes unnecessary downtime.

Proposal

Skip (or short-circuit) the deploy job when a merge touches only non-runtime paths. Candidate "docs/tooling-only" allowlist:

  • *.md (incl. CLAUDE.md, CHANGELOG.md)
  • scripts/**
  • docs/** (if/when it exists)

Options to evaluate:

  • A path filter on the workflow, or a guard step that diffs the merge commit against its parent and exits the deploy job early when every changed file matches the allowlist.
  • Keep check running regardless (lint/typecheck/tests are cheap and still useful).

Acceptance

  • Merging a docs/tooling-only PR does not rebuild/restart prod containers.
  • Merging any PR that touches src/**, pyproject.toml, uv.lock, Dockerfile, docker-compose.yml, settings.yaml, or workflow files still deploys.

Context: introduced alongside the PR-based workflow (PRs #65, #66). See the "Development workflow" section in CLAUDE.md.

## Problem Every merge to `main` runs the `deploy` job, which does `docker compose build --no-cache && up -d` for all containers. Doc/tooling-only changes (e.g. `CLAUDE.md`, `scripts/**`) therefore trigger a full no-cache rebuild + restart of production despite no runtime code change. Wasteful and causes unnecessary downtime. ## Proposal Skip (or short-circuit) the `deploy` job when a merge touches only non-runtime paths. Candidate "docs/tooling-only" allowlist: - `*.md` (incl. `CLAUDE.md`, `CHANGELOG.md`) - `scripts/**` - `docs/**` (if/when it exists) Options to evaluate: - A path filter on the workflow, or a guard step that diffs the merge commit against its parent and exits the `deploy` job early when every changed file matches the allowlist. - Keep `check` running regardless (lint/typecheck/tests are cheap and still useful). ## Acceptance - Merging a docs/tooling-only PR does **not** rebuild/restart prod containers. - Merging any PR that touches `src/**`, `pyproject.toml`, `uv.lock`, `Dockerfile`, `docker-compose.yml`, `settings.yaml`, or workflow files **still** deploys. Context: introduced alongside the PR-based workflow (PRs #65, #66). See the "Development workflow" section in `CLAUDE.md`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
gertjan/bodega#67
No description provided.