fix: Preserve benchmark data when deploying docs#256
Merged
Conversation
Remove --force flag from mkdocs gh-deploy to prevent overwriting benchmark-comparison/ and benchmark-data/ directories on gh-pages branch. This allows benchmark workflow results to coexist with documentation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Replace GitHub Actions cache with sccache for Rust compilation: - Add mozilla-actions/sccache-action for content-based caching - Keep lightweight Cargo registry cache for dependency resolution - Remove target/ directory from cache (now handled by sccache) Benefits: - sccache automatically shares compilation artifacts across all branches/PRs - Faster builds with better cache hit rates - Reduces cache storage requirements 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Change default value from 'linux' to 'linux,macos' to match actual behavior and make it clearer in GitHub UI. The workflow logic already runs both linux and macos by default in fast mode, so this makes the default value consistent with the behavior. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add mkdir call to ensure the output directory exists before attempting to write the interactive comparison report. Fixes FileNotFoundError when benchmark-comparison/ directory doesn't exist in gh-pages-repo. Resolves: https://github.com/biodatageeks/polars-bio/actions/runs/18807518335/job/53664440711 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Benchmark Comparison: fix/preserve-benchmark-data-gh-pages vs 0.18.0📊 View Interactive Charts | 📦 Download Artifacts Benchmark comparison generated by polars-bio CI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--forceflag frommkdocs gh-deploycommand in documentation workflowbenchmark-comparison/andbenchmark-data/directories on the gh-pages branchProblem
The benchmark workflow (
.github/workflows/benchmark.yml) generates interactive comparison reports and stores them in:benchmark-comparison/- Interactive comparison reportsbenchmark-data/- Raw benchmark dataHowever, the documentation workflow uses
mkdocs gh-deploy --force, which force-pushes and overwrites the entire gh-pages branch, deleting these directories.Example: In the most recent run, the benchmark workflow created the page at 19:10:57, but the documentation workflow ran at 19:13:38 and wiped it out.
Solution
Remove the
--forceflag from the mkdocs deployment command. Without--force, MkDocs will preserve existing files and directories that it doesn't manage, allowing benchmark data to coexist with documentation.Test plan
🤖 Generated with Claude Code