Simplify preview-docs workflow: use github-script@v7 and remove visual diffing #3433
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
Simplifies the preview-docs GitHub workflow by:
thollander/actions-comment-pull-request@v2.4.3withactions/github-script@v7for posting PR commentsfern docs diff, artifact uploads)/api/fern-docs/get-slug-for-fileAPI endpoint to resolve MDX file paths to slugsThe PR comment will show the preview URL and a list of changed pages with clickable links to each changed MDX file's preview.
Review & Testing Checklist for Human
/api/fern-docs/get-slug-for-fileendpoint is available on preview URLs and returns the expected format ({ mappings: [{ file, slug }] })user.type === 'Bot'and the:herb:marker)Recommended test plan: Open a test PR that modifies an MDX file, let the workflow run, and verify:
Notes
Requested by: kenny@buildwithfern.com
Link to Devin run: https://app.devin.ai/sessions/a22b7becfc7449e2aa54fb71f928535b