Skip to content

Commit efd6011

Browse files
baijumclaude
andcommitted
fix: checkout main before fetching PR branch
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 509fb0b commit efd6011

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/preview.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ jobs:
2727
2828
cd /opt/apps/${APP_NAME}
2929
30+
# Ensure we're on main before fetching (previous run may have left us on a PR branch)
31+
git checkout main 2>/dev/null || true
32+
3033
# Fetch and checkout the PR branch
3134
git fetch origin pull/${PR_NUMBER}/head:pr-${PR_NUMBER} --force
3235
git checkout pr-${PR_NUMBER}

0 commit comments

Comments
 (0)