Skip to content

Add internal→public docs promotion pipeline - #6

Open
VeronicaSnyk wants to merge 1 commit into
mainfrom
docs-promotion-pipeline
Open

Add internal→public docs promotion pipeline#6
VeronicaSnyk wants to merge 1 commit into
mainfrom
docs-promotion-pipeline

Conversation

@VeronicaSnyk

Copy link
Copy Markdown
Owner

What this adds

Scaffolds the staging→prod promotion the AI ContentOps roadmap calls for: this internal repo is the source of truth (docs content + the internal kitchen — skills, scripts, workflows); the public snyk/user-docs repo is a content-only frontend gate.

Files

File Purpose
promote/promote-to-public.sh Mirrors canonical root sections (docs/<section> → public /<section>), opens a reviewable PR, never merges.
promote/ingest-from-public.sh Seeds/refreshes internal docs from public root sections; skips the GitBook-owned docs/ folder.
.github/workflows/promote-to-public.yml Runs promotion on push to main, gated by Vale + link/summary/image checks, then opens the PR.
promote/README.md Runbook: architecture, setup, validation, promotion criterion.

Safety properties (validated end-to-end against snyk/user-docs in --dry-run)

  • Public docs/ is never touched — it's GitBook Git Sync territory. Protected via rsync --filter protect and by syncing only named sections. Verified: docs/, .gitbook.yaml, SUMMARY.md survive untouched.
  • No GitBook plumbing leaks to the public root.
  • tools/ excluded — synced Go infra (api-docs-generator), not content.
  • Kitchen can't leak — allowlist, not denylist.
  • Gate scripts pass against this repo's 1,101 files (exit 0).

Canonical-tree decision

Confirmed with evidence that the root sections are canonical (not the docs/ folder): the error-catalog sync workflow writes to a root path; root discover-snyk has 178 files vs docs/'s 37; root content is fresher (2026-07-06 vs 2026-06-11).

Not yet live

Does not run until: (1) PUBLIC_DOCS_REPO variable set, (2) PUBLIC_DOCS_PUSH_TOKEN secret added, (3) real target chosen. On a feature-branch PR the workflow does not execute. Nothing has touched snyk/user-docs.

🤖 Generated with Claude Code

Scaffolds the staging→prod promotion the AI ContentOps roadmap calls for:
this internal repo is the source of truth (content + kitchen); the public
snyk/user-docs repo is a content-only frontend gate.

- promote/promote-to-public.sh — mirrors canonical ROOT sections
  (docs/<section> → public /<section>), opens a reviewable PR, never merges.
- promote/ingest-from-public.sh — seeds/refreshes internal docs from public
  ROOT sections, skipping the GitBook-owned docs/ folder.
- .github/workflows/promote-to-public.yml — runs promotion on push to main,
  gated by Vale + link/summary/image checks, then opens the PR.

Both directions protect the public docs/ tree (GitBook Git Sync territory) and
exclude tools/ (synced Go infra). Validated end-to-end against snyk/user-docs
in --dry-run: no GitBook plumbing leak, docs/ untouched, gate scripts pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant