Skip to content

Deploy — Docs to Central Repo ​

Verifies a repo's docs/ before the centralized docs site (KevinDeBenedetti/kevindebenedetti.github.io) picks them up.

The central site is pull-based: its docs-poll.yml workflow compares the docs/ tree SHA of every public repo with the state the live site was built from (every 12 hours, or on demand) and rebuilds when something changed. Its sync-docs.ts then re-clones the latest docs/ from every public repo. Source repos therefore need no token, App or secret: this workflow only makes sure the docs are valid before they are published.

Usage ​

yaml
jobs:
  docs:
    uses: KevinDeBenedetti/github-workflows/.github/workflows/cd-docs.yml@main

Inputs ​

InputTypeDefaultDescription
docs-directorystringdocsDocs folder in the calling repo, verified by the verify job
client-idstring''Deprecated, leave empty. When set, the legacy docs-updated dispatch is also sent (see below)
target-repostringKevinDeBenedetti/kevindebenedetti.github.ioLegacy dispatch only: repository that receives the event
target-directorystring(calling repo name)Legacy dispatch only: logical name sent in the payload

Outputs ​

OutputDescription
docs-synced"true" when the legacy docs-updated event was dispatched; empty otherwise

Secrets ​

SecretRequiredDescription
APP_PRIVATE_KEY❌Legacy dispatch only: private key of the client-id App

How it works ​

  1. A verify job checks out the calling repo and runs check-docs-links and check-vitepress-md against docs-directory (default docs), so a broken doc fails the caller's CI instead of the central build.
  2. The central site's scheduled poll notices the new docs/ tree SHA and rebuilds.

Migrating from the dispatch ​

Callers that still pass client-id / APP_PRIVATE_KEY keep working: the dispatch job then mints an App token and sends the old repository_dispatch event. To drop the App, remove both from the caller, then delete the DOCS_APP_CLIENT_ID variable and DOCS_APP_PRIVATE_KEY secret:

diff
   docs:
     uses: KevinDeBenedetti/github-workflows/.github/workflows/cd-docs.yml@main
-    with:
-      client-id: ${{ vars.DOCS_APP_CLIENT_ID }}
-    secrets:
-      APP_PRIVATE_KEY: ${{ secrets.DOCS_APP_PRIVATE_KEY }}