-
Notifications
You must be signed in to change notification settings - Fork 235
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
Fix release pathing #2606
Fix release pathing #2606
Conversation
WalkthroughThe pull request modifies two GitHub Actions workflow files by introducing a new boolean input parameter called Changes
Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/build-frontend.yml
(2 hunks).github/workflows/new-zo-release.yml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: typecheck
- GitHub Check: lint
- GitHub Check: call-build / build
- GitHub Check: call-build / build
- GitHub Check: call-build / build
- GitHub Check: test
- GitHub Check: call-build / build
- GitHub Check: gen-file
🔇 Additional comments (2)
.github/workflows/new-zo-release.yml (1)
15-15
: LGTM! Setting nested_deployments to false is appropriate for releases.This ensures the release is deployed to the root folder instead of being nested, which is the expected behavior for releases.
.github/workflows/build-frontend.yml (1)
27-30
: LGTM! Well-documented input parameter.The new
nested_deployments
parameter is clearly documented with its purpose and impact on deployment behavior.
touch frontend_name | ||
echo ${{inputs.deployment_name}} > deployment_name | ||
echo ${{inputs.repo_name}} > repo_name | ||
echo ${{inputs.repo_deploy_secret_name}} > repo_deploy_secret_name | ||
echo $(git rev-parse HEAD) > ref | ||
- name: echos (frontend_name) | ||
if: inputs.nested_deployments == 'true' | ||
run: | | ||
echo ${{inputs.frontend_name}} > frontend_name |
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.
🛠️ Refactor suggestion
Refactor the frontend_name file handling.
Several issues with the current implementation:
- Creating an empty file then conditionally filling it is confusing
- Boolean comparison uses string 'true' instead of boolean true
- The empty frontend_name file is still uploaded as an artifact
Consider this alternative approach:
- touch frontend_name
echo ${{inputs.deployment_name}} > deployment_name
echo ${{inputs.repo_name}} > repo_name
echo ${{inputs.repo_deploy_secret_name}} > repo_deploy_secret_name
echo $(git rev-parse HEAD) > ref
- - name: echos (frontend_name)
- if: inputs.nested_deployments == 'true'
- run: |
- echo ${{inputs.frontend_name}} > frontend_name
+ if [ "${{inputs.nested_deployments}}" = true ]; then
+ echo ${{inputs.frontend_name}} > frontend_name
+ else
+ echo "" > frontend_name
+ fi
This change:
- Consolidates the frontend_name file handling into a single step
- Uses proper boolean comparison
- Makes the empty file creation explicit when nested_deployments is false
📝 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.
touch frontend_name | |
echo ${{inputs.deployment_name}} > deployment_name | |
echo ${{inputs.repo_name}} > repo_name | |
echo ${{inputs.repo_deploy_secret_name}} > repo_deploy_secret_name | |
echo $(git rev-parse HEAD) > ref | |
- name: echos (frontend_name) | |
if: inputs.nested_deployments == 'true' | |
run: | | |
echo ${{inputs.frontend_name}} > frontend_name | |
- name: Create deployment files | |
run: | | |
echo ${{inputs.deployment_name}} > deployment_name | |
echo ${{inputs.repo_name}} > repo_name | |
echo ${{inputs.repo_deploy_secret_name}} > repo_deploy_secret_name | |
echo $(git rev-parse HEAD) > ref | |
if [[ "${{inputs.nested_deployments}}" == true ]]; then | |
echo "${{inputs.frontend_name}}" > frontend_name | |
else | |
echo "" > frontend_name | |
fi |
[] [Fri Jan 24 02:43:47 UTC 2025] - Deployed b115abb to https://genshin-optimizer-prs.github.io/pr/2606/ (Takes 3-5 minutes after this completes to be available) [] [Fri Jan 24 02:45:03 UTC 2025] - Deployed b115abb to https://genshin-optimizer-prs.github.io/pr/2606/ (Takes 3-5 minutes after this completes to be available) [Fri Jan 24 04:24:48 UTC 2025] - Deleted deployment |
Describe your changes
Issue or discord link
Testing/validation
Checklist before requesting a review (leave this PR as draft if any part of this list is not done.)
yarn run mini-ci
locally to validate format and lint.Summary by CodeRabbit
nested_deployments
parameter