ci: automate docs/sdk mirror sync from metacore-sdk - #30
Open
akromicc wants to merge 1 commit into
Open
Conversation
Daily scheduled workflow clones the public metacore-sdk repo, runs a copy+transform script against its docs/, and opens a PR here if the mirror drifted — replacing the manual copy-paste that let docs/sdk/ silently fall behind metacore-sdk#748 (kernel v0.49 -> v0.94).
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Por qué
docs/sdk/*.mden este repo es un espejo demetacore-sdk/docs/copiado a mano, sin ningún script de sync. Por eso se desactualizó en silencio durante meses (el kernel pasó de v0.49 a v0.94 sin que el sitio se enterara) hasta el refresh manual de #29.Qué hace
scripts/sync-sdk-docs.sh <path-a-metacore-sdk>: copia cadadocs/*.mdde metacore-sdk adocs/sdk/, aplicando dos transforms conocidos:./assets/metacore.svg→/logo.svg(asset propio del sitio).(./archivo.md...)→(./archivo...)(routing sin extensión de VitePress), incluyendo el mapeo de los dos únicos archivos renombrados (CONSUMER_GUIDE.md→consumer-guide.md,PUBLISHING.md→publishing.md).docs/sdk/index.mdnunca se toca — es landing page propia del sitio, sin equivalente en el SDK..github/workflows/sync-sdk-docs.yml: corre el script diariamente (cron) + on-demand (workflow_dispatch), clonandometacore-sdk(repo público, sin credenciales extra) en un checkout separado. Si hay diffs, abre un PR automático (nunca push directo a main) usando elGITHUB_TOKENpor defecto — no requiere ningún secret nuevo.Qué falta / decisiones tomadas
metacore-sdkes público, así que el checkout cross-repo funciona con el token por defecto. Si algún día se vuelve privado, hay que agregar un secretMETACORE_SDK_READ_TOKEN(PAT scoperepo, solo lectura) — dejé el comentario en el workflow.docs/es/sdk/no se toca: es traducción real, no copia — el PR automático solo lista qué archivoses/quedaron potencialmente desincronizados (mismo basename que undocs/sdk/*.mdtocado) para revisión manual; no traduce automáticamente.metacore-kernel/docs/no se sincroniza con nada — son docs internas propias del kernel (arquitectura Go), no un espejo de otro repo, así que no aplica este pipeline.