Optimize deployment preview pruning with sparse checkout
#19.678 aperta il 25 mag 2026
Metriche repository
- Star
- (10.013 star)
- Metriche merge PR
- (Merge medio 22g 16h) (332 PR mergiate in 30 g)
Descrizione
Context
Meshery's deployment preview workflow already has pruning logic that keeps preview deployments within a limit greater than 6. As a result, any PR preview older than that limit can be pruned and will only come back after a recent commit or push to that PR.
There is also a long-running step in the workflow that can likely be reduced by using sparse checkout instead of checking out the entire gh-pages branch.
Reference implementation
Meshery has a similar deployment preview fix that uses sparse checkout for preview deployment assets:
Example of current waiting time
An example Meshery workflow run showing the long wait time:
Proposed change
Apply the same Meshery deployment preview fix to Meshery's deployment preview workflow so that it checks out only the required preview deployment paths from gh-pages, rather than the full branch. This should reduce the time spent in the preview pruning/deployment step while preserving the existing preview pruning behavior.
Acceptance criteria
- Meshery deployment preview workflow uses sparse checkout for the relevant
gh-pagespreview deployment paths. - Existing pruning behavior remains intact.
- Preview deployment step duration is reduced compared with full
gh-pagescheckout.