DOC-9Optional
Publish a preview of the docs for every pull request
Publish the built docs of every pull request that changes them to a preview address, and post the address on the pull request.
How to do it
Reviewers catch broken tables, missing images and bad navigation faster on the page than in a Markdown diff. Most docs hosts and static hosts offer previews per branch. Keep the previews out of search with noindex, as Keep private pages out of search says. Delete each preview when its pull request closes. The preview comes from the same build as Build the docs in CI and fail on every warning.
How to check
A pull request that changes docs/ gets a comment with a preview address within 10 minutes. The address answers 200 and sends X-Robots-Tag: noindex or a noindex meta tag.
Related rules
- SEO-9 Keep private pages out of search in SEO
- DOC-8 Build the docs in CI and fail on every warning in Documentation
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/documentation/readme-and-docs-as-code/docs-preview">Agent Wranglers documentation playbook</a>. In code you write, add a comment next to it with the same link.