Skip to content

Improve validate-mdx and calibre actions#2571

Merged
mdlinville merged 2 commits intomainfrom
improve_actions
Apr 28, 2026
Merged

Improve validate-mdx and calibre actions#2571
mdlinville merged 2 commits intomainfrom
improve_actions

Conversation

@mdlinville
Copy link
Copy Markdown
Contributor

@mdlinville mdlinville commented Apr 28, 2026

Description

  • Fix validate-mdx hanging when a commit changes no MDX files, like when the Calibre action runs. Now:
    • The action will succeed early if it sees nothing to validate, not even bothering to install the mint CLI. for mint validate to consider, like when the Calibre action commits an image optimization.
    • The action will run if it finds files that match (mdx|json|ya?ml|png|jpe?g|webp)
  • Fix Calibre action's token. Actions triggered by other actions can no longer use GITHUB_TOKEN to write into a PR if the image is added / updated by a commit after the first one. I created a classic PAT owned by wandb that grants read-write access only to wandb/docs, saved it as a repo secret, and updated the action to use it. We were confused why this seemed to not be a problem for coreweave/docs but I was actually able to reproduce it by the second commit in https://github.com/coreweave/docs/pull/2949. CoreWeave won't be able to use a PAT but could potentially use the same auth mechanism that is approved for DocEngine.

Testing

  • Local testing
  • Temporarily added these fixes in Release notes for v0.80.0 #2569, which was impacted by these bugs, verified that the actions work correctly there.
  • Local build succeeds without errors (mint dev)
  • Local link check succeeds without errors (mint broken-links)
  • PR tests succeed

- Succeed early if the commit includes no eligible
  changes, bailing before trying to install the mint CLI
- Better detection of the Git state in the PR
@mdlinville mdlinville requested a review from a team as a code owner April 28, 2026 23:01
@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented Apr 28, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
wandb 🟢 Ready View Preview Apr 28, 2026, 11:06 PM

Use repo secret that contains a classic PAT with
with read-write access to wandb/docs so that the
action can add a commit to a PR that adds or
updates images
@mdlinville mdlinville merged commit 012f7da into main Apr 28, 2026
10 checks passed
@mdlinville mdlinville deleted the improve_actions branch April 28, 2026 23:51
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