Skip to content

Commit 3ad2609

Browse files
themr0cclaude
andcommitted
fix: address reviewer comments on deploy script
- Add comment: orphan path is a bootstrap safety net - Add comment: branch cleanup catches all stale branches via ls-remote Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d728190 commit 3ad2609

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

build/scripts/deploy-gh-pages.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ git -C "$DEPLOY_DIR" config "http.${REPO_URL}.extraHeader" "Authorization: Basic
8686

8787
# ── Core functions ───────────────────────────────────────────────────────────
8888

89+
# gh-pages exists in practice; orphan path is a bootstrap safety net
8990
fetch_gh_pages() {
9091
if git -C "$DEPLOY_DIR" fetch origin gh-pages --depth=1 2>/dev/null; then
9192
git -C "$DEPLOY_DIR" checkout -B gh-pages FETCH_HEAD
@@ -139,7 +140,8 @@ cleanup() {
139140
fi
140141
done
141142

142-
# Branch cleanup: remove directories for deleted remote branches
143+
# Branch cleanup: remove directories for deleted remote branches (rhdh-*, 1.*.x, etc.)
144+
# No pattern list needed — we check if each branch still exists on the remote
143145
for d in "$DEPLOY_DIR"/*/; do
144146
[[ -d "$d" ]] || continue
145147
local dir_name

0 commit comments

Comments
 (0)