-
Notifications
You must be signed in to change notification settings - Fork 233
ci: Allow repo to self publish docs #1821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughA new GitHub Actions workflow "Release docs" is introduced that orchestrates documentation building and publishing with support for dry-run mode, version tagging, email notifications, and S3 artifact management on AWS. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.github/workflows/release-docs.yml:
- Around line 23-27: Remove the unused required workflow input named
"version-number" from the workflow inputs block (it's currently declared
alongside "notify-emails") because the publish-docs logic auto-detects the
version from the git ref and never consumes this input; update the inputs
section to delete the "version-number" entry so manual dispatchers aren't
required to provide it and ensure no other steps reference "version-number".
🧹 Nitpick comments (1)
.github/workflows/release-docs.yml (1)
39-40: Align template versions for consistent publish-docs behavior.Line 39 uses
[email protected], while the publish-docs step (lines 47–48, 51) uses v0.67.2. Version v0.67.2 includes a bug fix for publishing tolatest, making the version skew problematic. Update line 39 to v0.67.2 to ensure consistent behavior across build and publish stages.Suggested alignment
- build-docs: - uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/[email protected] + build-docs: + uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/[email protected]Also consider pinning external workflow and action references to commit SHAs instead of tags to prevent tag retargeting risks when running with secrets.
.github/workflows/release-docs.yml
Outdated
| version-number: | ||
| description: Version number to release this as (use `latest` for main branch) | ||
| required: true | ||
| type: string | ||
| notify-emails: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
# Find and read the workflow file
find . -name "release-docs.yml" -type f | head -20Repository: NVIDIA-NeMo/RL
Length of output: 94
🏁 Script executed:
# Also check the directory structure
git ls-files | grep -E "\.github/workflows" | head -20Repository: NVIDIA-NeMo/RL
Length of output: 812
🏁 Script executed:
cat -n .github/workflows/release-docs.ymlRepository: NVIDIA-NeMo/RL
Length of output: 3587
🏁 Script executed:
# Search for any references to "version-number" in the workflow file to confirm it's truly unused
rg "version-number" .github/workflows/release-docs.ymlRepository: NVIDIA-NeMo/RL
Length of output: 79
🏁 Script executed:
# Check if there's any documentation or action definition for publish-docs in the repo
find . -name "publish-docs*" -type f | head -20Repository: NVIDIA-NeMo/RL
Length of output: 40
🏁 Script executed:
# Search for publish-docs action references across workflows
rg "publish-docs" .github/workflows/ -A 5 -B 2Repository: NVIDIA-NeMo/RL
Length of output: 2024
Remove unused required input version-number to avoid confusing workflow dispatchers.
The version-number input defined at lines 23–27 is never passed to the publish-docs action. The workflow auto-detects the version from the git reference (publishing to "latest" for main, or extracting from version tags). Remove this input to prevent misleading users during manual workflow dispatch.
Suggested fix
- version-number:
- description: Version number to release this as (use `latest` for main branch)
- required: true
- type: string📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| version-number: | |
| description: Version number to release this as (use `latest` for main branch) | |
| required: true | |
| type: string | |
| notify-emails: | |
| notify-emails: |
🤖 Prompt for AI Agents
In @.github/workflows/release-docs.yml around lines 23 - 27, Remove the unused
required workflow input named "version-number" from the workflow inputs block
(it's currently declared alongside "notify-emails") because the publish-docs
logic auto-detects the version from the git ref and never consumes this input;
update the inputs section to delete the "version-number" entry so manual
dispatchers aren't required to provide it and ensure no other steps reference
"version-number".
.github/workflows/release-docs.yml
Outdated
| description: Email addresses to send the notification to. Format as "[email protected],[email protected]". | ||
| required: true | ||
| type: string | ||
| aws-region: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need to be exposed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fair. Should just be an env var. I doubt it's a value that changes by repo
.github/workflows/release-docs.yml
Outdated
| required: true | ||
| type: boolean | ||
| default: true | ||
| version-number: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be inferred from the code? also how does pushing the docs for each "version" work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove this. It's not used. The workflow actually uses the version from the Github version tag when the workflow is ran. If it's a Github tag, then it'll push the docs according to that tag as the version. Otherwise, if it's main branch, it'll push to "latest".
The version just changes the path in the s3 bucket.
Signed-off-by: Charlie Truong <[email protected]>
Signed-off-by: Charlie Truong <[email protected]>
Signed-off-by: Charlie Truong <[email protected]>
d811caf to
4577d79
Compare
What does this PR do ?
Allow repo to self publish docs by building and pushing to s3.
Issues
List issues that this PR closes (syntax):
Usage
# Add a code snippet demonstrating how to use thisBefore your PR is "Ready for review"
Pre checks:
Additional Information
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.