Repository navigation
Conversation
Adds publish_readme-docs.yml. On merges to main that touch one of the 12 mirrored READMEs, it saves the README (cleaned up the same way the devsite's live mirror does) as a working draft of the matching DotcmsDocumentation contentlet on the authoring server, via the EDIT workflow action with disabledWYSIWYG, then unlocks the page. Reuses the AUTODOC_DOTCMS_BASE_URL var and AUTODOC_DOTCMS_API_TOKEN_DRAFTING secret. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 of 6 tasks
The list of mirrored pages now lives in dotCMS instead of this file: every DotcmsDocumentation page whose readmeSource field is a https://github.com/dotCMS/core/blob/main/<path>.md URL is synced, so pages can be added or removed without a core PR. The trigger widens to any markdown change on main, and each run checks all mapped pages. Also: fail fast on a rejected token (an invalid token otherwise reads the public pages as anonymous), validate source paths, retry a save once on a dotCMS 5xx, and always release the lock after a save attempt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jdcmsd
marked this pull request as ready for review
October 14, 2026 10:39
Changed pages now go through the authoring server's Push Publish action (save, publish, unlock, push to prod) with the new AUTODOC_DOTCMS_API_TOKEN_PUBLISH secret (CI Autodoc Publish User), and the run waits for the page's push bundle to succeed. The action reports success even when the user may not push to any environment, so the bundle check is what catches that. Also compare against each page's current version rather than search results, which can lag behind recent saves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Closes #38024
Proposed Changes
.github/workflows/publish_readme-docs.yml. It copies markdown files from this repo, mostly the SDK and example READMEs, into their documentation pages (DotcmsDocumentationcontentlets) on the dotCMS authoring server.GITHUB_DOCS_MAPin the devsite). After this change the text lives in dotCMS, where search indexes it. The file stays the single source of truth: each run overwrites the page body, and dotCMS keeps the version history.readmeSourcefield holds ahttps://github.com/dotCMS/core/blob/main/<path>.mdURL is synced. Adding or removing a page is a field edit in dotCMS and needs no core PR. URLs pointing anywhere else (other repos, npm) are left alone.mainthat touches a*.mdfile, about 4 a day, each taking a few seconds. Each run checks all mapped pages and writes only those whose body differs, so a newly mapped page fills in on the next markdown merge.prodenvironment), with"disabledWYSIWYG": ["documentation"]so the markdown is stored as markdown (the same flagissue_autodoc.ymluses). The run then finds that page's push bundle in the publishing queue and waits for it to succeed..mdpaths that exist in the checkout.AUTODOC_DOTCMS_BASE_URLvar, and a newAUTODOC_DOTCMS_API_TOKEN_PUBLISHsecret (already added) for the CI Autodoc Publish User. That user exists only on the authoring server, so production applies pushes as its system user. Its Dev Publish role needs View, Edit and Publish on the site, the same on the Documentation content type (which lives on System Host), permission to use the Push Publish action, and permission to push toprod. The draft-only autodoc user and secret are unchanged; autodoc's new docs still go through human review.workflow_dispatchis available. It is a dry run by default, posts per-page diffs to the run summary, and can be limited to specific pages byurlTitle.NOTIFY_GITHUB_USERS, looked up in.github/data/slack-mappings.json). This posts directly withSLACK_BOT_TOKEN. It does not use or change the shared channel resolver or the PR notifier.Currently mapped (12 pages): the 8
core-web/libs/sdk/*libraries,core-web/apps/mcp-server, and theexamples/{nextjs,angular,astro}READMEs.Checklist
main:.., absolute and non-.mdpaths, fail on missing files, and skip other repos and npm.sdk-events-librarypicked up a README change merged after seeding, and its push toprodsucceeded.sdk-types-librarywas given a draft that differed from the README; the run detected it, published and pushed the README text, and confirmed bundle SUCCESS in about 30 seconds. A dry run afterwards reports all 12 pages unchanged.BUNDLE_REQUESTED.permissions: contents: read. The dotCMS credential is a non-admin publishing user limited to the Dev Publish role. Run summaries are public and contain only markdown text and diffs.mainnow reach production without a person checking the page. The text is reviewed repo markdown, and dotCMS keeps every version, so any page can be restored.Additional Info
sdk-events-libraryis current), so the first run after merge should report everything unchanged.dotcms-php-sdkrepo) and the .NET example page. Removing the synced entries from the devsite'sGITHUB_DOCS_MAPis a separate follow-up.🤖 Generated with Claude Code