ci: stash changes before branch checkout in phase 7

morgankrey and factory-droid[bot] created

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>

Change summary

.github/workflows/docs_automation.yml | 6 ++++++
1 file changed, 6 insertions(+)

Detailed changes

.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)