From 12c2c7c66807c112cae06eae75a974f301f3d0f0 Mon Sep 17 00:00:00 2001 From: morgankrey Date: Fri, 19 Dec 2025 13:57:30 -0600 Subject: [PATCH] ci: stash changes before branch checkout in phase 7 Fixes conflict when daily branch already exists and local changes from phase 5 would be overwritten. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> --- .github/workflows/docs_automation.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/docs_automation.yml b/.github/workflows/docs_automation.yml index 7fa39168c3cfac8b79273906d2c1110a33df69f7..5b72bc4051f34ae890bc291281f8797312f5d52d 100644 --- a/.github/workflows/docs_automation.yml +++ b/.github/workflows/docs_automation.yml @@ -202,6 +202,9 @@ jobs: # Daily batch branch - one branch per day, multiple commits accumulate BRANCH_NAME="docs/auto-update-$(date +%Y-%m-%d)" + # Stash local changes from phase 5 + git stash push -m "docs-automation-changes" -- docs/src/ + # Check if branch already exists on remote if git ls-remote --exit-code --heads origin "$BRANCH_NAME" > /dev/null 2>&1; then echo "Branch $BRANCH_NAME exists, checking out and updating..." @@ -212,6 +215,9 @@ jobs: git checkout -b "$BRANCH_NAME" fi + # Apply stashed changes + git stash pop || true + # Stage and commit git add docs/src/ SUMMARY=$(head -50 < /tmp/phase6-summary.md)