-
Notifications
You must be signed in to change notification settings - Fork 2
🐛 Keep preview files, when updating the main #8
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 introduces modifications to two GitHub Actions workflow files. In Changes
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-8 |
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
🧹 Nitpick comments (1)
.github/workflows/docs.yml (1)
55-55: Consider implementing a cleanup strategyWhile keeping files is necessary, consider implementing a cleanup strategy to prevent the accumulation of stale content over time. This could include:
- Adding a periodic cleanup workflow for old PR preview directories
- Implementing a retention policy based on PR age or status
Would you like me to help create a cleanup workflow to manage the retained files?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/docs.yml(1 hunks).github/workflows/pr-close.yml(1 hunks)
🔇 Additional comments (2)
.github/workflows/pr-close.yml (1)
12-12: LGTM: Using stable Ubuntu LTS version
The change from Ubuntu 24.04 to Ubuntu 22.04 is appropriate as it uses the latest stable LTS release instead of a pre-release version.
.github/workflows/docs.yml (1)
55-55: LGTM with considerations: Keeping files during deployment
The addition of keep_files: true aligns with the PR objective to retain preview files when updating the main branch. This ensures that PR previews aren't removed during main branch documentation updates.
Let's verify the current structure of gh-pages branch:
✅ Verification successful
Keep files parameter is correctly implemented
The keep_files: true parameter is correctly placed in the deploy_site job and not in the deploy_preview job, which is the intended behavior:
- Main branch deployments preserve files (including PR previews) through
keep_files: true - PR previews are deployed to separate directories (
pull-{PR_NUMBER}) and don't interfere with each other - The workflow includes proper cleanup as PR previews are isolated in their own directories
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check the current structure of gh-pages branch to understand what files need to be preserved
git ls-remote --heads origin gh-pages
if [ $? -eq 0 ]; then
git fetch origin gh-pages
git ls-tree -r --name-only origin/gh-pages | grep "pull-" || echo "No PR preview directories found"
fi
Length of output: 447
Script:
#!/bin/bash
# Let's check the workflow file to understand the deployment paths and structure
cat .github/workflows/docs.yml
Length of output: 3832
Summary by CodeRabbit
keep_files: trueparameter to retain existing files on GitHub Pages.