Skip to content

fix(workflow): repair sync-large-assets — heredoc-in-YAML parse bug#851

Open
DeveloperAlly wants to merge 2 commits intomainfrom
fix/sync-large-assets-yaml
Open

fix(workflow): repair sync-large-assets — heredoc-in-YAML parse bug#851
DeveloperAlly wants to merge 2 commits intomainfrom
fix/sync-large-assets-yaml

Conversation

@DeveloperAlly
Copy link
Copy Markdown
Collaborator

Summary

  • Fixes the sync-large-assets.yml workflow which has never successfully run since it was added
  • Root cause: bash heredocs (<<EOF, <<MANIFEST) inside a YAML | block put content at column 0, which breaks GitHub Actions' YAML parser — every run failed at parse time with 0s duration
  • Lowers threshold from 20 MB to 1 MB (the old threshold only caught 1 of 10 binary files)
  • Adds weekly cron schedule (Sunday midnight UTC)
  • Adds paths: filter so push trigger only fires on actual asset changes
  • Replaces branch wildcard + if condition with explicit branch list

Context

Ref: #849 — this PR fixes the automation that was supposed to be syncing large assets to the docs-v2-assets branch. Once merged to main, the schedule (cron) and workflow_dispatch (manual) triggers will work. Push triggers on docs-v2 and docs-v2-dev already use the workflow from their respective branches — docs-v2-dev has this fix, and docs-v2 will pick it up on next merge.

Test plan

  • After merge, trigger manually via workflow_dispatch in Actions UI to confirm it parses and runs
  • Verify docs-v2-assets branch receives synced files
  • Confirm cron runs the following Sunday

🤖 Generated with Claude Code

The workflow has never successfully run since it was added. Root cause:
bash heredocs (<<EOF, <<MANIFEST) inside a YAML | block put content at
column 0, which breaks GitHub Actions' YAML parser. Every run failed at
parse time with 0s duration.

Fixes:
- Replace all heredocs with printf/echo (the actual parse fix)
- Lower threshold from 20MB to 1MB (catches all 10 binary files, not just 1)
- Add weekly cron schedule (Sunday midnight UTC)
- Add paths filter so push trigger only fires on asset changes
- Explicit branch list (docs-v2, docs-v2-dev) replaces wildcard + if condition
- Move input resolution to a separate step to avoid || '' expression pattern

Ref: #849

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 29, 2026

📊 V2 Browser Sweep Results

❌ Test report not found. The test may have failed before report generation.

  • Likely failed in setup/cache/server-start steps before npm run test:v2-pages.

Adds a boolean dry_run input to workflow_dispatch. When enabled,
the workflow runs all selection and staging logic but skips the
push — reports what would be synced via --stat output instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant