ci: fix patch snapshot refresh to apply structural changes#2413
Merged
Conversation
…ral changes The refresh logic only updated files already in the versioned snapshot, so renames and additions in a patch release were silently skipped. This left the snapshot with broken links (updated content pointing to files that didn't exist yet). Now also copies files present in live docs/ but absent from the snapshot. Orphaned files (in snapshot but not in live docs) are still left as-is so existing external links keep resolving. When a patch refresh includes structural changes (additions or orphans), a Slack notification fires so someone can verify the snapshot looks right. Requires SLACK_WEBHOOK_URL in the publish-docs environment; silently skips the notification if not set. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Moves the snapshot decision and file operations out of the inline YAML
into .github/scripts/sync-snapshot.sh so it can be run locally:
.github/scripts/sync-snapshot.sh \
--downstream ../embedded-sdk-docs \
--trigger workflow_run \
--dry-run
The workflow now detects the action before calling the script (so the
commit message label is based on pre-run state, not post-run state) and
delegates all file work to the script.
Drops the Slack webhook approach; structural change warnings are printed
to stdout (and become GitHub Actions annotations via ::warning:: in CI).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
mariechatfield
commented
Jul 15, 2026
Contributor
Author
There was a problem hiding this comment.
Most of this logic is extracted from publish-docs.yaml, so that I could run this locally and manually reason about what will happen
krisxcrash
approved these changes
Jul 15, 2026
serikjensen
approved these changes
Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/but absent from the snapshot. Orphans (in snapshot but not in live docs) are left as-is so existing external links keep resolving..github/scripts/sync-snapshot.shso it can be run and tested locally:.github/scripts/sync-snapshot.sh --downstream ../embedded-sdk-docs --trigger workflow_run --dry-runTest plan
--trigger workflow_run --dry-runshows the 17 expected adds and 2 orphans for version-0.52🤖 Generated with Claude Code