-
-
Notifications
You must be signed in to change notification settings - Fork 156
Update deploy-preview.yml #836
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
Conversation
|
""" WalkthroughThe change adds a step in the GitHub Actions deploy job to create a shortened Git commit SHA from the full pull request head SHA and updates the Cloudflare deployment command to use this shortened SHA as the branch identifier. No other logic or control flow is modified. Changes
Sequence Diagram(s)No sequence diagram generated as the change is limited to a workflow configuration update and does not affect control flow. Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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
Documentation and Community
|
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: 2
🧹 Nitpick comments (1)
.github/workflows/deploy-preview.yml (1)
63-63: Remove trailing whitespace
YAMLLint reports trailing spaces on this empty line (63). Please delete any spaces so the line is completely blank.-␣🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 63-63: trailing spaces
(trailing-spaces)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
.github/workflows/deploy-preview.yml(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/deploy-preview.yml
[error] 63-63: trailing spaces
(trailing-spaces)
|
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: 0
♻️ Duplicate comments (1)
.github/workflows/deploy-preview.yml (1)
70-70:⚠️ Potential issueIncorrect context for CLOUDFLARE_PROJECT_NAME.
The deploy command uses
${{ vars.CLOUDFLARE_PROJECT_NAME }}, but you haven’t defined it undervars. If this is a secret, reference it properly; otherwise declare it as an environment variable. For example:- command: pages deploy dist --project-name=${{ vars.CLOUDFLARE_PROJECT_NAME }} --branch=${{ env.COMMIT_SHORT_SHA }} --commit-dirty=true + command: pages deploy dist --project-name=${{ secrets.CLOUDFLARE_PROJECT_NAME }} --branch=${{ env.COMMIT_SHORT_SHA }} --commit-dirty=true
🧹 Nitpick comments (1)
.github/workflows/deploy-preview.yml (1)
58-63: Set short Git SHA step is valid; consider minor refinements.The approach of truncating the pull request head SHA via
echo+headworks without a checkout.
- Remove the trailing spaces on line 63 to satisfy YAMLlint.
- Optionally simplify to Bash parameter expansion (avoiding
head):- calculatedSha=$(echo ${{ github.event.pull_request.head.sha }} | head -c 8) + calculatedSha=${GITHUB_SHA:0:8}and then:
- echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV + echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 63-63: trailing spaces
(trailing-spaces)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
.github/workflows/deploy-preview.yml(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/deploy-preview.yml
[error] 63-63: trailing spaces
(trailing-spaces)
* Update deploy-preview.yml * Adding short sha to make the urls cleaner * Remove requirement for checkout



Missing equals sign
Summary by CodeRabbit