-
Notifications
You must be signed in to change notification settings - Fork 2
🐛 Use different GH action to properly clean up preview branches #7
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 pull request focuses on updating GitHub Actions workflow configurations in two files: Changes
Sequence DiagramsequenceDiagram
participant GA as GitHub Actions
participant Workflow as Docs/PR Workflow
participant Pages as GitHub Pages
GA->>Workflow: Trigger workflow
Workflow->>Pages: Deploy using new action
Pages-->>Workflow: Deployment confirmation
Workflow-->>GA: Workflow completion
Possibly related PRs
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 (
|
|
🪓 PR closed, deleted preview at https://github.com/cardil/solution-pattern-event-mesh-for-microservices/tree/gh-pages/pull-7 |
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
🔭 Outside diff range comments (1)
.github/workflows/pr-close.yml (1)
Line range hint
11-11: Ensure consistent runner versions across workflowsThis workflow is still using
ubuntu-24.04while.github/workflows/docs.ymlhas been updated to useubuntu-22.04. Consider updating this for consistency.- runs-on: [ ubuntu-24.04 ] + runs-on: [ ubuntu-22.04 ]
🧹 Nitpick comments (1)
.github/workflows/docs.yml (1)
51-57: Review deployment configuration and permissionsThe deployment configuration looks good, but there are a few suggestions:
- Consider adding
keep_files: trueto preserve other branches' deployments- Add
enable_jekyll: falsesince this is an Antora site- Consider using deployment status checks for better visibility
uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: "${{ env.SITE_DIR }}" commit_message: "[CI] Publish Documentation for ${{ github.sha }}" user_name: 'github-actions[bot]' user_email: 'github-actions[bot]@users.noreply.github.com' + keep_files: true + enable_jekyll: falseAlso applies to: 94-101
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/docs.yml(5 hunks).github/workflows/pr-close.yml(1 hunks)
🔇 Additional comments (2)
.github/workflows/pr-close.yml (1)
23-30: Verify the new action's version and parameters
The switch to peaceiris/actions-gh-pages@v4 looks good, but there are a few considerations:
- The action version
v4seems incorrect as the latest stable version isv3. The repository showsv4is still in development. - The parameter mapping appears correct, but we should verify it works with empty directories for cleanup.
.github/workflows/docs.yml (1)
Line range hint 85-86: Verify preview URL generation
The BASE_URL environment variable setup looks correct, but we should verify that the new action handles the path structure the same way as the previous action.
✅ Verification successful
Preview URL generation is correctly implemented
The workflow correctly handles the preview URL structure:
- Sets
PR_PATHaspull-${{ github.event.number }} - Properly constructs the BASE_URL using standard GitHub Pages format:
https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/${{ env.PR_PATH }} - Uses the same path structure in the
destination_dirfor deployment - Includes cleanup workflow to remove previews when PRs are closed
The implementation follows GitHub Pages conventions and maintains consistency between URL generation, deployment paths, and cleanup processes.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check if there are any hardcoded references to the old URL structure
rg -t yaml "github.io.*pull-" .github/workflows/
Length of output: 50
Script:
#!/bin/bash
# Let's check the current workflow file for URL/path related configurations
cat .github/workflows/docs.yml
# Also check for any other workflow files that might be related to documentation
fd -e yml -e yaml . .github/workflows/ --exec cat {}
Length of output: 8890
Summary by CodeRabbit