ci: request reindex when frontmatter changes#2378
Closed
blakecduncan wants to merge 1 commit intomainfrom
Closed
Conversation
Detect frontmatter diffs in changed docs pages and send frontmatterChanged to markdown revalidation once per run. Fail the workflow when reindex was requested but not successfully triggered. Made-with: Cursor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the docs markdown revalidation GitHub Actions workflow to detect frontmatter changes and request a docs-site reindex when navigation/slug-affecting metadata changes.
Changes:
- Detects frontmatter diffs across changed
docs/pages/**/*.md(x)files during the workflow run. - Sends
frontmatterChanged: trueonly once (in the first revalidation batch) to avoid duplicate reindex requests. - Fails the workflow when a frontmatter-driven reindex is requested but not acknowledged as triggered by the API response.
Comment on lines
42
to
45
| echo "No MDX files changed in /docs/pages/ directory" | ||
| echo "filePaths=[]" >> $GITHUB_OUTPUT | ||
| echo "frontmatterChanged=false" >> $GITHUB_OUTPUT | ||
| exit 0 |
There was a problem hiding this comment.
Redirects to $GITHUB_OUTPUT should be quoted (e.g., >> "$GITHUB_OUTPUT") to avoid edge cases if the path contains spaces or special characters. This is the pattern recommended by GitHub Actions docs and makes the step more robust.
Comment on lines
+84
to
+86
| echo "frontmatterChanged: $FRONTMATTER_CHANGED" | ||
| echo "filePaths=$FILE_PATHS_JSON" >> $GITHUB_OUTPUT | ||
| echo "frontmatterChanged=$FRONTMATTER_CHANGED" >> $GITHUB_OUTPUT |
There was a problem hiding this comment.
Quote $GITHUB_OUTPUT in these output writes (e.g., >> "$GITHUB_OUTPUT") for robustness and to match GitHub Actions recommendations.
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.
Description
Update SDK docs markdown revalidation workflow to notify docs-site when frontmatter changes so index rebuilds happen for slug/navigation-affecting updates.
Summary
docs/pages/**/*.md(x)filesfrontmatterChanged: trueto/docs/api/revalidate/markdownonce per workflow runTest Plan
frontmatterChanged: trueLINEAR TASK: https://linear.app/alchemy/issue/DX-2383/reindex-on-frontmatter-change
Made with Cursor
PR-Codex overview
This PR enhances the GitHub Actions workflow in
.github/workflows/revalidate-sdk-content.ymlby adding checks for frontmatter changes in Markdown files. It updates the output to reflect whether frontmatter has changed and adjusts the API call payload accordingly.Detailed summary
extract_frontmatterfunction to extract frontmatter from files.frontmatterChanged.