chore: add deploy script for dev/prod CI releases #190
No reviewers
Labels
No Label
ai-changes-requested
ai-failed
ai-merged
ai-pr-opened
ai-reviewed
ai-reviewing
ai-reviewing
ai-working
bug
enhancement
evolution
performance
phase-0
phase-1a
phase-1b
phase-1c
phase-1d
security
tech-debt
todo
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/paper-dynasty-database#190
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "chore/deploy-script"
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?
Summary
scripts/deploy.shfor tag-based CI deployments./scripts/deploy.sh dev [commit]— force-updatesdevgit tag, triggers CI:devDocker build./scripts/deploy.sh prod [commit]— creates CalVer tag +latest+productiongit tags with confirmation promptDetails
Test plan
shellcheck scripts/deploy.sh— no warnings./scripts/deploy.sh dev— verify dev tag push + CI trigger./scripts/deploy.sh prod— verify CalVer generation + confirmation prompt🤖 Generated with Claude Code
AI Code Review
Files Reviewed
scripts/deploy.sh(added)storage/templates/player_card.html(modified — not described in PR)storage/templates/style.html(modified — not described in PR)Findings
Correctness
BLOCKING — Undisclosed template changes not in scope for this PR
The diff includes modifications to two HTML template files that are not mentioned anywhere in the PR title, summary, or test plan:
storage/templates/player_card.html: removes 3 Google Fonts<link>tagsstorage/templates/style.html: adds@font-facedeclarations with base64-encoded WOFF2 data URIs (5 font variants: Open Sans 300/400/700, Source Sans 3 400/700)These changes match open PR #96 ("feat: self-hosted WOFF2 fonts via base64 embedding") exactly. Merging this PR would silently land those font changes without the review and test plan that PR #96 provides. The branch should be rebased onto current
mainwith the font changes removed — they belong in PR #96.BLOCKING — PR is not currently mergeable
mergeable: false— there are merge conflicts withmainthat must be resolved before this can land.Security
No issues found in
scripts/deploy.sh. Confirmation prompt before prod push is appropriate. Force-push is scoped to floating tags only (dev,latest,production), not the immutable CalVer tag.Style & Conventions
MINOR —
sedwith unescaped dots in PREFIXscripts/deploy.shline ~63:PREFIXexpands to e.g.2026.4.. In sed,.is a regex metacharacter matching any character. While benign in practice (CalVer tags are controlled), strictly correct form escapes the dots. Thegit tag -lglob already pre-filters, so this only causes problems if a tag like2026X4Y1existed (impossible in practice). Note only, non-blocking.MINOR —
ENVvariable nameENV="$1"shadows the POSIX$ENVvariable (used by some shells to locate the initialization file). Convention is to use a less generic name likeDEPLOY_ENV. Low real-world risk.Suggestions
scripts/deploy.shlogic is otherwise well-constructed:set -euo pipefail✓git fetch --tagsbefore any tagging operations ✓grep -qE '(^|\s)(main|remotes/origin/main)$') correctly handles* mainandremotes/origin/mainoutput formats ✓${LAST_BUILD:-0}empty-guard for first build of a month ✓max + 1approach is robust against deleted/out-of-order tags ✓Verdict: REQUEST_CHANGES
Two blockers: (1) the diff silently includes the
player_card.html+style.htmlfont-embedding changes from open PR #96 with no mention in this PR's description — those changes must be removed from this branch; (2) the PR has a merge conflict withmainthat needs resolution. Thescripts/deploy.shitself is clean and ready once the branch is corrected.Automated review by Claude PR Reviewer
Pull request closed