Automate versioned docs publishing to PyThaiNLP/docs on release#1338
Draft
Automate versioned docs publishing to PyThaiNLP/docs on release#1338
Conversation
Co-authored-by: wannaphong <8536487+wannaphong@users.noreply.github.com>
…workflow Co-authored-by: wannaphong <8536487+wannaphong@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add automation for building PyThaiNLP/docs on new version release
Automate versioned docs publishing to PyThaiNLP/docs on release
Mar 14, 2026
|
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.




Documentation for each release was manually copied to
PyThaiNLP/docsand the version index had to be hand-updated.What do these changes do
.github/workflows/publish-versioned-docs.yml: triggered onrelease: published, copiesPyThaiNLP/dev-docs→PyThaiNLP/docs/{version}/and updates both index pagesbuild_tools/github/update_docs_index.py: helper script with two modes:--docs-dir: regeneratesdocs/index.htmlas a landing page listing all version directories, sorted newest-first--dev-docs-index: injects/updates a<!-- BEGIN VERSIONS -->…<!-- END VERSIONS -->block indev-docs/index.html; idempotent (no-ops if version already present, appends before</body>if markers are absent)What was wrong
No automation existed to archive dev docs as a versioned snapshot or maintain the version listing when a release was published.
How this fixes it
On each GitHub release the workflow:
vprefix from the tag (v5.3.1→5.3.1)dev-docs/intodocs/{version}/viarsyncdocs/index.htmlfrom the directory listingdev-docs/index.htmlPERSONAL_TOKENThe workflow runs only on
PyThaiNLP/pythainlp(not forks) and usespermissions: contents: readfor theGITHUB_TOKEN.Your checklist for this pull request
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.