Skip to content

Document publishing pipeline

examples/document_publish_pipeline.php synchronizes generated repository HTML to an organization or project document.

Flow

  1. Read HTML from the workspace.
  2. Search for a document by title and automation tag.
  3. Create a draft if absent.
  4. Update content and editor membership if present.
  5. Add an integration audit comment.
  6. 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.