Skip to content

docs: add documentation versioning support#834

Open
vdusek wants to merge 4 commits intomasterfrom
docs/add-documentation-versioning
Open

docs: add documentation versioning support#834
vdusek wants to merge 4 commits intomasterfrom
docs/add-documentation-versioning

Conversation

@vdusek
Copy link
Contributor

@vdusek vdusek commented Mar 18, 2026

Summary

  • Add Docusaurus versioning support with version dropdown in the navbar.
  • Add manual doc snapshots for versions 3.3, 2.7, and 1.7 (with API reference).
  • Automate doc version creation on stable releases in the release workflow (minor/major create new versions, patches override the latest).

Mirrors the approach from apify-client-python PRs #674 and #676.

Test plan

  • Doc rendered locally
  • CI passes

Add Docusaurus versioning with version dropdown, version snapshots for
3.3, 2.7, and 1.7, and automated versioning in the release workflow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Mar 18, 2026
@vdusek vdusek self-assigned this Mar 18, 2026
@github-actions github-actions bot added this to the 136th sprint - Tooling team milestone Mar 18, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vdusek vdusek requested a review from barjin March 18, 2026 13:37
@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.47%. Comparing base (5a37023) to head (0231e08).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #834   +/-   ##
=======================================
  Coverage   86.47%   86.47%           
=======================================
  Files          48       48           
  Lines        2905     2905           
=======================================
  Hits         2512     2512           
  Misses        393      393           
Flag Coverage Δ
e2e 38.03% <ø> (ø)
integration 59.44% <ø> (ø)
unit 74.45% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@barjin barjin left a comment

Choose a reason for hiding this comment

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

Thank you @vdusek, I have a few questions regarding some of the changes

Comment on lines +176 to +177
# Use the default branch ref to include both changelog and versioned docs.
ref: ${{ github.ref }}
Copy link
Member

Choose a reason for hiding this comment

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

As far as GitHub docs are concerned (link), github.ref ...is the branch or tag ref that triggered the workflow run.

If I understand correctly, this will be the commit that this workflow_dispatch was invoked on, without the changelog and versioned docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, thanks, fixed - now it uses needs.version_docs.outputs.version_docs_commitish which should include both changelog and versioned docs.

Comment on lines +118 to +119
with:
token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps we can explicitly checkout the needs.changelog_update.outputs.changelog_commitish, to prevent race conditions or other mishaps?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, checkout now explicitly uses ref: ${{ needs.changelog_update.outputs.changelog_commitish }}

Copy link
Member

Choose a reason for hiding this comment

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

How are these changes connected to the rest of the PR? IIRC this is done automatically by docusaurus-plugin-typedoc-api 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting, this should follow the same pattern as in apify-client-python, if I undo these changes and remove the transform docs script and pydoc markdown yaml it does not work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I tried a bit more, they are gone and I'll remove them from the Client's docs as well, thanks!

Copy link
Member

Choose a reason for hiding this comment

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

Same for this file, it shouldn't be necessary to do this here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting, this should follow the same pattern as in apify-client-python, if I undo these changes and remove the transform docs script and pydoc markdown yaml it does not work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I tried a bit more, they are gone and I'll remove them from the Client's docs as well, thanks!

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

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants