Skip to content

Conversation

@albertomercurio
Copy link
Member

Description

This PR improves the documentation preview cleanup workflow to handle stale previews more effectively.

Changes

  • Added scheduled cleanup: Runs weekly (Sunday midnight) to check for stale previews from closed PRs
  • Added manual trigger: Can be triggered manually via GitHub Actions UI
  • Dual behavior:
    • On PR close → immediately deletes that PR's preview
    • On schedule/manual → checks all existing previews and deletes any from closed PRs
  • Simplified logic: Pure bash implementation, no external dependencies
  • Removed unnecessary deployments: write permission

Why This Change?

The current workflow only triggers when a PR closes. If the workflow didn't exist when old PRs were closed, or if it failed, those previews remain forever. Currently, there are 20 stale preview folders taking up 2.3 GB in the gh-pages branch.

This improvement will automatically clean up those stale previews on the first scheduled run or when manually triggered.

Note

This keeps the critical "delete history" pattern to prevent the .git folder from growing excessively large due to large documentation builds.

@albertomercurio albertomercurio added the Skip ChangeLog Skip changelog update check in PR label Oct 10, 2025
@ytdHuang ytdHuang merged commit 4c4d03a into qutip:main Oct 11, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip ChangeLog Skip changelog update check in PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants