Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
ci: Disable automated docs on pushes to `main` (#45416)
Marshall Bowers58461377ca06
diff --git a/.github/workflows/docs_automation.yml b/.github/workflows/docs_automation.ymlindex 5b72bc4051f..46dcfa56616 100644--- a/.github/workflows/docs_automation.yml+++ b/.github/workflows/docs_automation.yml@@ -1,11 +1,11 @@name: Documentation Automationon:- push:- branches: [main]- paths:- - 'crates/**'- - 'extensions/**'+ # push:+ # branches: [main]+ # paths:+ # - 'crates/**'+ # - 'extensions/**'workflow_dispatch:inputs:pr_number:@@ -29,7 +29,7 @@ jobs:docs-automation:runs-on: ubuntu-latesttimeout-minutes: 30-+steps:- name: Checkout repositoryuses: actions/checkout@v4@@ -77,7 +77,7 @@ jobs:echo "ref=$SHA" >> "$GITHUB_OUTPUT"git diff --name-only "${SHA}^" "$SHA" > /tmp/changed_files.txt || git diff --name-only HEAD~1 HEAD > /tmp/changed_files.txtfi-+echo "Changed files:"cat /tmp/changed_files.txtenv:@@ -102,24 +102,24 @@ jobs:run: |CHANGED_FILES=$(tr '\n' ' ' < /tmp/changed_files.txt)echo "Analyzing changes in: $CHANGED_FILES"-+# Build prompt with contextcat > /tmp/phase3-prompt.md << 'EOF'$(cat .factory/prompts/docs-automation/phase3-analyze.md)-+## Context-+### Changed Files$CHANGED_FILES-+### Phase 2 Output$(cat /tmp/phase2-output.txt)EOF-+"$DROID_BIN" exec \-m "$DROID_MODEL" \"$(cat .factory/prompts/docs-automation/phase3-analyze.md)-+Changed files: $CHANGED_FILES" \> /tmp/phase3-output.md 2>&1 || trueecho "Change analysis complete"@@ -135,7 +135,7 @@ jobs:> /tmp/phase4-plan.md 2>&1 || trueecho "Documentation plan complete"cat /tmp/phase4-plan.md-+# Check if updates are requiredif grep -q "NO_UPDATES_REQUIRED" /tmp/phase4-plan.md; thenecho "updates_required=false" >> "$GITHUB_OUTPUT"@@ -163,10 +163,10 @@ jobs:run: |echo "Formatting documentation with Prettier..."cd docs && prettier --write src/-+echo "Verifying Prettier formatting passes..."cd docs && prettier --check src/-+echo "Prettier formatting complete"# Phase 6: Summarize Changes (Read-Only - default)@@ -176,7 +176,7 @@ jobs:run: |# Get git diff of docsgit diff docs/src/ > /tmp/docs-diff.txt || true-+"$DROID_BIN" exec \-m "$DROID_MODEL" \-f .factory/prompts/docs-automation/phase6-summarize.md \@@ -194,17 +194,17 @@ jobs:echo "No documentation changes detected"exit 0fi-+# Configure gitgit config user.name "factory-droid[bot]"git config user.email "138933559+factory-droid[bot]@users.noreply.github.com"-+# Daily batch branch - one branch per day, multiple commits accumulateBRANCH_NAME="docs/auto-update-$(date +%Y-%m-%d)"-+# Stash local changes from phase 5git stash push -m "docs-automation-changes" -- docs/src/-+# Check if branch already exists on remoteif git ls-remote --exit-code --heads origin "$BRANCH_NAME" > /dev/null 2>&1; thenecho "Branch $BRANCH_NAME exists, checking out and updating..."@@ -214,10 +214,10 @@ jobs:echo "Creating new branch $BRANCH_NAME..."git checkout -b "$BRANCH_NAME"fi-+# Apply stashed changesgit stash pop || true-+# Stage and commitgit add docs/src/SUMMARY=$(head -50 < /tmp/phase6-summary.md)@@ -228,13 +228,13 @@ jobs:Triggered by: ${{ steps.changed.outputs.source }} ${{ steps.changed.outputs.ref }}Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>"-+# Pushgit push -u origin "$BRANCH_NAME"-+# Check if PR already exists for this branchEXISTING_PR=$(gh pr list --head "$BRANCH_NAME" --json number --jq '.[0].number' || echo "")-+if [ -n "$EXISTING_PR" ]; thenecho "PR #$EXISTING_PR already exists for branch $BRANCH_NAME, updated with new commit"else@@ -254,7 +254,7 @@ jobs:run: |echo "## Documentation Automation Summary" >> "$GITHUB_STEP_SUMMARY"echo "" >> "$GITHUB_STEP_SUMMARY"-+if [ "${{ steps.phase4.outputs.updates_required }}" == "false" ]; thenecho "No documentation updates required for this change." >> "$GITHUB_STEP_SUMMARY"elif [ -f /tmp/phase6-summary.md ]; then