Document publishing pipeline¶
examples/document_publish_pipeline.php synchronizes generated repository HTML to an organization or project document.
Flow¶
- Read HTML from the workspace.
- Search for a document by title and automation tag.
- Create a draft if absent.
- Update content and editor membership if present.
- Add an integration audit comment.
- Publish if
PUBLISH_DOCUMENT=true.
export DOCUMENT_HTML_FILE="runbook.html"
export DOCUMENT_TITLE="Production Deployment Runbook"
export DOCUMENT_EDITORS="01USERA,01USERB"
export PUBLISH_DOCUMENT="true"
php examples/document_publish_pipeline.php
Separating synchronization and publication allows CI pipelines to execute quality checks prior to document status changes.