Skip to content

Conversation

@Kyle-Ye
Copy link
Collaborator

@Kyle-Ye Kyle-Ye commented Oct 6, 2025

Summary

Fix the gh-pages deployment script to actually prevent commit accumulation when FORCE_PUSH=true.

Problem

The update-gh-pages-documentation.sh script has FORCE_PUSH=true as the default to "save git repo size (avoids accumulating large binary files)". However, it was creating a new commit each time and then force pushing, which defeats the purpose. This still accumulates commits with large binary files in the gh-pages branch history.

Solution

When FORCE_PUSH=true, use git commit --amend instead of creating new commits. This ensures the gh-pages branch maintains only one commit, truly preventing accumulation of large binary files.

Changes

  • Use git commit --amend when FORCE_PUSH=true to modify the existing commit
  • Handle the edge case for the first commit (when there's nothing to amend yet)
  • Keep the original behavior when FORCE_PUSH=false (creates new commits)

Result

  • With FORCE_PUSH=true: gh-pages branch will have only 1 commit, repo size stays minimal
  • With FORCE_PUSH=false: gh-pages branch preserves full history

Related

This fixes the behavior introduced in the documentation build refactoring.

@github-actions github-actions bot added bug Something isn't working documentation Improvements or additions to documentation P2 Low priority labels Oct 6, 2025
@Kyle-Ye Kyle-Ye merged commit 5281451 into main Oct 6, 2025
7 of 8 checks passed
@Kyle-Ye Kyle-Ye deleted the fix/gh-pages-amend-commit branch October 6, 2025 13:10
@codecov
Copy link

codecov bot commented Oct 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 24.63%. Comparing base (b73162a) to head (e92ef1e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #555      +/-   ##
==========================================
- Coverage   24.64%   24.63%   -0.01%     
==========================================
  Files         505      505              
  Lines       29204    29204              
==========================================
- Hits         7196     7195       -1     
- Misses      22008    22009       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation P2 Low priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants