Repository navigation
Open
Description
Overview
This issue tracks the implementation of Phase 2 publishing workflow upgrades across QuantEcon lecture repositories. The upgrade performs a one-time cleanup of gh-pages branch history to dramatically reduce repository sizes.
Prerequisite: Phase 1 (HTML Archive to Release Assets) is complete - see #253
Objective
Remove accumulated deployment commits from gh-pages branches to reduce repository sizes by ~96%.
Expected Results
| Metric | Before | After | Improvement |
|---|---|---|---|
| Repository size | ~4 GB | ~100 MB | 96% reduction |
| Fresh clone time | 5-10 min | ~30 sec | 90% faster |
| gh-pages commits | 100-200+ | 1 | 99% fewer |
| Bandwidth per clone | ~4 GB | ~100 MB | 97% less |
Cleanup Procedure (Per Repository)
1. Create Backup Branch
git fetch origin gh-pages
git branch gh-pages-backup origin/gh-pages2. Create Fresh Orphan Branch
git checkout gh-pages
git checkout --orphan gh-pages-new
git add -A
git commit -m "Fresh gh-pages deployment (history cleanup to reduce repo size)"3. Replace Old gh-pages
git branch -D gh-pages
git branch -m gh-pages
git push origin gh-pages --force4. Verify
# Should show 1 commit
git rev-list --count origin/gh-pages
# Verify website still works
# Visit the site URLImplementation Status
Active Lecture Repositories
| Repository | Site URL | Status | Notes |
|---|---|---|---|
| lecture-python.myst | python.quantecon.org | ⏳ Pending | |
| lecture-python-programming.myst | python-programming.quantecon.org | ⏳ Pending | |
| lecture-python-advanced.myst | python-advanced.quantecon.org | ⏳ Pending | |
| lecture-python-intro | intro.quantecon.org | ⏳ Pending | |
| lecture-jax | jax.quantecon.org | ⏳ Pending | |
| lecture-intro.zh-cn | intro-zh-cn.quantecon.org | ⏳ Pending | |
| lecture-python-programming.fa | - | ⏳ Pending | |
| lecture-datascience.myst | datascience.quantecon.org | ⏳ Pending | |
| lecture-julia.myst | julia.quantecon.org | ⏳ Pending | |
| lecture-python.zh-cn | - | ⏳ Pending |
Legacy Repositories (Skipped)
The following repositories are scheduled for archival and will not receive this upgrade:
lecture-dlelecture-dpslecture-dynamicslecture-econometrics-machine-learninglecture-eqmlecture-statslecture-tools-techniques
Rollback Procedure
If issues occur after cleanup:
git push origin gh-pages-backup:gh-pages --forceRelated
- Phase 1 Issue: #253 (Complete)
- Original Implementation Plan: lecture-python.myst#661
- Phase 3: Enable
force_orphan: truefor future deployments (prevents history re-accumulation)
Next Steps
- Perform cleanup on each repository
- Verify websites are still accessible after each cleanup
- Delete backup branches after 1-2 weeks of verification
- Proceed to Phase 3 (enable force_orphan)
Metadata
Metadata
Assignees
Labels
No labels
Activity
mmcky commentedon Nov 26, 2025
Blocked: Waiting on action-backups
Phase 2 is currently blocked pending the rollout of QuantEcon/action-backups to create full repository backups before performing the destructive gh-pages history cleanup.
This provides an additional safety layer beyond the
gh-pages-backupbranches and Phase 1 HTML release archives.