Valkyrian Labs logo

Publishing

Request published docs output safely from signed sync.

Publishing

Publishing is server-owned. The CLI can request publishing with --publish, but the server decides whether publishing is allowed.

1pmdocs push \2  --endpoint "$DOCS_SYNC_ENDPOINT" \3  --source main-docs \4  --key-id github-actions-main \5  --private-key-env DOCS_SYNC_PRIVATE_KEY \6  --publish

Server Requirements

1target: {2  type: 'docsCollection',3  enableDrafts: true,4},5sync: {6  allowWrites: true,7  allowPublish: true,8}

If publishing is not allowed, the endpoint returns a deterministic error.

When --publish is not requested, synced generated docs are written as drafts.

A sync records sync.lastSyncedAt and sync.lastStatus on the docs set without creating a docs-set version, so admin edits saved as a draft on the docs set stay unpublished. The only publish a sync performs on the docs set itself is the first --publish sync of a docs set that has never been published.

Hard Delete Is Separate

Publishing does not imply hard delete. Hard delete requires sync.allowHardDelete: true and deleteBehavior: 'delete'. Archive remains the safer default.