Skip to content

Organize documentation by version on the Readme Portal#9269

Draft
ShahanaFarooqui wants to merge 3 commits into
ElementsProject:masterfrom
ShahanaFarooqui:readme-versioning
Draft

Organize documentation by version on the Readme Portal#9269
ShahanaFarooqui wants to merge 3 commits into
ElementsProject:masterfrom
ShahanaFarooqui:readme-versioning

Conversation

@ShahanaFarooqui

Copy link
Copy Markdown
Collaborator

Changelog-Added: The Documentation Portal now retains and organizes documentation according to individual release versions.

@ShahanaFarooqui

Copy link
Copy Markdown
Collaborator Author

Reminder: Once this PR is merged, we need to enable the version dropdown in Appearance > Navigation > Version.

… server

Changelog-Added: The Documentation Portal now retains and organizes documentation according to individual release versions.
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}")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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" \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}" \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above, branches, --retry, and --fail but more importantly what happens if we release a hotfix for an older version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants