Skip to content

ci(docs): ensure documentation version matches release version#3709

Merged
adrianschmidt merged 1 commit intomainfrom
docs-fix
Oct 20, 2025
Merged

ci(docs): ensure documentation version matches release version#3709
adrianschmidt merged 1 commit intomainfrom
docs-fix

Conversation

@adrianschmidt
Copy link
Contributor

@adrianschmidt adrianschmidt commented Oct 20, 2025

Documentation was being generated from the commit before semantic-release's version bump, opening the risk of potentialluy using the previous version number. Now checks out the release tag to ensure package.json has the correct version when building the documentation.

Summary by CodeRabbit

  • Chores
    • Updated documentation publishing workflow to support specifying git references during the publication process.

Review:

  • Commits are atomic
  • Commits have the correct type for the changes made
  • Commits with breaking changes are marked as such

Browsers tested:

(Check any that applies, it's ok to leave boxes unchecked if testing something didn't seem relevant.)

Windows:

  • Chrome
  • Edge
  • Firefox

Linux:

  • Chrome
  • Firefox

macOS:

  • Chrome
  • Firefox
  • Safari

Mobile:

  • Chrome on Android
  • iOS

Documentation was being generated from the commit before semantic-release's
version bump, opening the risk of potentialluy using the previous version number.
Now checks out the release tag to ensure package.json has the correct version
when building the documentation.
@coderabbitai
Copy link

coderabbitai bot commented Oct 20, 2025

📝 Walkthrough

Walkthrough

The changes enable dynamic Git reference passing through GitHub Actions workflows. A new ref input parameter is added to the publish-docs workflow, and the release workflow now exports the new release tag as output and passes it to the publish-docs job during invocation.

Changes

Cohort / File(s) Summary
Publish docs workflow input
.github/workflows/publish-docs.yml
Added ref input parameter (string type, optional) to workflow_call.inputs and configured the checkout action to use it via ${{ inputs.ref }}
Release workflow output propagation
.github/workflows/release.yml
Added new_release_git_tag output from the semantic-release job and passed it to the publish-docs workflow as the ref input using needs.semantic-release.outputs.new_release_git_tag

Sequence Diagram(s)

sequenceDiagram
    participant release as Release Workflow
    participant sem as Semantic Release Step
    participant pub as Publish Docs Workflow
    participant checkout as Checkout Action

    release->>sem: Execute semantic-release
    sem-->>release: Output: new_release_git_tag
    release->>pub: Call publish-docs workflow<br/>ref: new_release_git_tag
    pub->>checkout: Checkout with ref parameter
    checkout-->>pub: Repository checked out at tag
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

docs

Suggested reviewers

  • jgroth
  • civing

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "ci(docs): ensure documentation version matches release version" clearly and specifically describes the main objective of this changeset. The PR modifies two GitHub Actions workflows to pass the semantic-release generated git tag to the publish-docs workflow, ensuring that documentation is built from the release tag with the correct version number rather than from the pre-release commit. The title uses conventional commit format, is concise without unnecessary noise, and a reviewer scanning the commit history would immediately understand that this PR addresses a versioning synchronization issue between documentation and release artifacts.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs-fix

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 15e17a1 and 193d4e6.

📒 Files selected for processing (2)
  • .github/workflows/publish-docs.yml (2 hunks)
  • .github/workflows/release.yml (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Test
  • GitHub Check: Docs / Publish Docs
  • GitHub Check: Build
🔇 Additional comments (2)
.github/workflows/release.yml (1)

26-26: Excellent implementation of the fix.

The semantic-release action outputs the Git tag associated with the new release, and both changes correctly propagate this value. Line 26 properly exports the output, and line 69 correctly passes it downstream. The conditional on line 62 ensures the docs job only runs when semantic-release has published, guaranteeing the output is available.

Also applies to: 69-69

.github/workflows/publish-docs.yml (1)

24-27: Correct implementation of conditional ref passing.

When the ref input evaluates to false or is empty, actions/checkout will fallback to the default. The workflow properly handles both scenarios: when invoked from release.yml with a specific tag (ensuring docs build from the correct commit), and when manually triggered without a ref (checking out the default branch). No explicit conditional logic is needed here—the pattern is clean and follows GitHub Actions best practices.

Also applies to: 47-48


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@adrianschmidt adrianschmidt merged commit 2aa60ec into main Oct 20, 2025
12 checks passed
@adrianschmidt adrianschmidt deleted the docs-fix branch October 20, 2025 13:12
@lime-opensource
Copy link
Collaborator

🎉 This PR is included in version 38.29.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants