fix(ci): guard docs deploy job against PR environment protection rejection#345
fix(ci): guard docs deploy job against PR environment protection rejection#345bensonwong merged 2 commits intomainfrom
Conversation
…ction GitHub evaluates environment protection rules before job `if` conditions, causing the github-pages deployment to be rejected on PR branches even with `github.ref == 'refs/heads/main'`. Adding `github.event_name == 'push'` ensures the deploy job is never queued for pull_request events. Also add ?style=flat-square to CI badge URL for visual consistency. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
📚 Documentation PreviewThe documentation has been built successfully. To preview locally:
|
| Status | Count |
|---|---|
| 🔍 Total | 391 |
| ✅ Successful | 336 |
| ⏳ Timeouts | 0 |
| 🔀 Redirected | 0 |
| 👻 Excluded | 20 |
| ❓ Unknown | 0 |
| 🚫 Errors | 35 |
Errors per input
Errors in docs/_site/api-reference.html
- [404] https://fonts.googleapis.com/ | Failed: Network error: Not Found
- [404] https://fonts.gstatic.com/ | Failed: Network error: Not Found
Errors in docs/_site/CONTRIBUTING.html
- [404] https://fonts.googleapis.com/ | Cached: Error (cached)
- [404] https://fonts.gstatic.com/ | Cached: Error (cached)
Errors in docs/_site/getting-started.html
- [404] https://fonts.gstatic.com/ | Cached: Error (cached)
- [404] https://fonts.googleapis.com/ | Cached: Error (cached)
Errors in docs/_site/index.html
- [404] https://fonts.googleapis.com/ | Cached: Error (cached)
- [404] https://fonts.gstatic.com/ | Cached: Error (cached)
Errors in docs/_site/404.html
- [404] https://fonts.googleapis.com/ | Failed: Network error: Not Found
- [404] https://fonts.gstatic.com/ | Failed: Network error: Not Found
Errors in docs/_site/frameworks/vercel-ai-sdk.html
- [404] https://fonts.gstatic.com/ | Cached: Error (cached)
- [404] https://fonts.googleapis.com/ | Cached: Error (cached)
Errors in docs/_site/curl-guide.html
- [404] https://fonts.gstatic.com/ | Failed: Network error: Not Found
- [404] https://fonts.googleapis.com/ | Failed: Network error: Not Found
Errors in docs/_site/components.html
- [404] https://fonts.gstatic.com/ | Cached: Error (cached)
- [404] https://fonts.googleapis.com/ | Cached: Error (cached)
Errors in docs/_site/frameworks/index.html
- [404] https://fonts.gstatic.com/ | Failed: Network error: Not Found
- [404] https://fonts.googleapis.com/ | Failed: Network error: Not Found
Errors in docs/_site/error-handling.html
- [ERR] file:///home/runner/work/deepcitation/deepcitation/docs/_site/getting-started.md | Failed: Cannot find file
- [404] https://fonts.gstatic.com/ | Cached: Error (cached)
- [ERR] file:///home/runner/work/deepcitation/deepcitation/docs/_site/styling.md | Failed: Cannot find file
- [404] https://fonts.googleapis.com/ | Cached: Error (cached)
- [ERR] file:///home/runner/work/deepcitation/deepcitation/docs/_site/api-reference.md | Failed: Cannot find file
Errors in docs/_site/frameworks/nextjs.html
- [404] https://fonts.googleapis.com/ | Cached: Error (cached)
- [404] https://fonts.gstatic.com/ | Cached: Error (cached)
Errors in docs/_site/styling.html
- [404] https://fonts.gstatic.com/ | Cached: Error (cached)
- [404] https://fonts.googleapis.com/ | Cached: Error (cached)
Errors in docs/_site/code-examples.html
- [404] https://fonts.gstatic.com/ | Failed: Network error: Not Found
- [404] https://fonts.googleapis.com/ | Failed: Network error: Not Found
Errors in docs/_site/verification-statuses.html
- [404] https://fonts.googleapis.com/ | Cached: Error (cached)
- [404] https://fonts.gstatic.com/ | Cached: Error (cached)
Errors in docs/_site/frameworks/langchain.html
- [404] https://fonts.gstatic.com/ | Cached: Error (cached)
- [404] https://fonts.googleapis.com/ | Cached: Error (cached)
Errors in docs/_site/types.html
- [404] https://fonts.googleapis.com/ | Cached: Error (cached)
- [404] https://fonts.gstatic.com/ | Cached: Error (cached)
Full Github Actions output
Workflow run: 23135895174
PR Review
|
✅ Playwright Test ReportStatus: Tests passed 📊 Download Report & Snapshots (see Artifacts section) What's in the Visual SnapshotsThe gallery includes visual snapshots for:
Run ID: 23135895201 |
The native GitHub Actions badge SVG does not support the `style` query parameter — that is a shields.io-only feature. The previous change added `?style=flat-square` to the link URL (the click-through destination) which has no visual effect. Switch to shields.io equivalent so the CI badge matches the visual style of the License, Zero Dependencies, and ~17KB badges. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
github.event_name == 'push'guard to the docs deploy job condition so it only runs on push events to main, not onpull_requesteventsTest plan
main— thedeployjob should be skipped entirely (not fail)main— thedeployjob should run normally and publish docs to GitHub Pages