Organize documentation by version on the Readme Portal#9269
Organize documentation by version on the Readme Portal#9269ShahanaFarooqui wants to merge 3 commits into
Conversation
|
Reminder: Once this PR is merged, we need to enable the version dropdown in Appearance > Navigation > Version. |
b6d8108 to
c8f369e
Compare
… server Changelog-Added: The Documentation Portal now retains and organizes documentation according to individual release versions.
c8f369e to
c2d197c
Compare
| echo "🔍 Checking if version '${SHORT_VERSION}' exists in ReadMe..." | ||
|
|
||
| EXISTING_VERSIONS=$(curl -s -X GET "https://api.readme.com/v2/branches" \ | ||
| -H "Authorization: Bearer ${README_API_KEY}") |
There was a problem hiding this comment.
We should probably add --retry x and --fail. Without --fail we might think a version does not exists when in reality we just could not get a network response here.
| # Prefer non-'master' versions as base | ||
| if name and 'master' not in name: | ||
| names.append(name) | ||
| # Get the last one (assuming sorted order) |
There was a problem hiding this comment.
Can we assume that? What if our releases were in this chronological order: v26.04 v26.06 v26.04.1 v26.06.1 ?
|
|
||
| # Create the new version via ReadMe API | ||
| # POST /v2/versions | ||
| CREATE_RESPONSE=$(curl -s -X POST "https://api.readme.com/v2/versions" \ |
There was a problem hiding this comment.
I think this is legacy API and in v2 it is all about branches, not versions: https://docs.readme.com/main/reference/api-upgrade-guide#versions
Also same here with --retry x and --fail
|
|
||
| - name: Install python modules | ||
| run: | | ||
| python -m pip install requests mako grpcio-tools |
There was a problem hiding this comment.
Is this still necessary?
|
|
||
| - name: Install dependencies | ||
| run: bash -x .github/scripts/setup.sh | ||
| curl -s -X PUT "https://api.readme.com/v2/versions/${README_VERSION}" \ |
There was a problem hiding this comment.
same as above, branches, --retry, and --fail but more importantly what happens if we release a hotfix for an older version?
Changelog-Added: The Documentation Portal now retains and organizes documentation according to individual release versions.