Skip to content

ci: consolidate preview comments into one auto-updating PR comment#12

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1779477549-fix-preview-workflow
Open

ci: consolidate preview comments into one auto-updating PR comment#12
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1779477549-fix-preview-workflow

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

Summary

Rewrites the preview workflow to post a single consolidated comment (instead of one per matrix project) that auto-updates on each push. Also adds the graphql example to all three workflow matrices (check, preview, publish).

Changes:

  • preview-docs.yml: Split into two jobs — generate-preview (matrix, runs in parallel) uploads each preview URL as an artifact, then comment (single job) collects all URLs and posts one table comment using comment_tag: preview-docs + mode: upsert
  • check.yml / publish-docs.yml: Added graphql to the project matrix

The resulting PR comment looks like:

Example Preview
docs-starter Preview
graphql Preview
i18n Preview
multi-source/homepage Preview
... ...
versioning Preview

Review & Testing Checklist for Human

  • Open a test PR with a trivial change and verify the workflow produces a single consolidated comment with all preview URLs
  • Push another commit to the test PR and verify the comment updates in place (not a new comment)
  • Verify the graphql example generates a valid preview URL

Notes

  • Simplified the checkout step to use ref: ${{ github.event.pull_request.head.sha }} instead of manual fetch + checkout
  • Removed the per-file page-links detection (which used git diff + the /api/fern-docs/get-slug-for-file endpoint) to keep the comment focused on preview URLs
  • The comment job uses if: ${{ !cancelled() }} so it runs even if some preview generations fail, showing :warning: Failed for those entries

Link to Devin session: https://app.devin.ai/sessions/4482e9f954d04c2cae29bfb4731b896d
Requested by: @devalog

- Rewrite preview-docs.yml to use a matrix generate job + a single comment job
- Each matrix job uploads its preview URL as an artifact
- The comment job collects all URLs and posts one consolidated table
- Uses comment_tag + upsert mode to auto-update on each push
- Add graphql example to all workflow matrices (check, preview, publish)

Co-Authored-By: Devin Logan <devinannlogan@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions
Copy link
Copy Markdown

🌿 Docs Previews

Example Preview
docs-starter Preview
graphql Preview
i18n Preview
multi-source/homepage Preview
multi-source/seeds Preview
multi-source/seeds-sunflower Preview
multi-source/seeds-tomato Preview
multi-source/greenhouses Preview
multi-source/nursery Preview
versioning Preview

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