Publishing Workflow Upgrade - Phase 2: gh-pages History Cleanup

Open
#261 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
git, github
Domain
devops, release

Research direction

Start with the listed active lecture repositories and review the gh-pages cleanup procedure, including the backup, orphan branch, force-push, and rollback commands. For each repository, verify that origin/gh-pages has one commit and that the listed site URL remains accessible; leave backup branches for the stated verification period.

Written by the indexing model from the issue text.

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-pages
2. 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 --force
4. Verify
# Should show 1 commit
git rev-list --count origin/gh-pages

# Verify website still works
# Visit the site URL

Implementation 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-dle
  • lecture-dps
  • lecture-dynamics
  • lecture-econometrics-machine-learning
  • lecture-eqm
  • lecture-stats
  • lecture-tools-techniques

Rollback Procedure

If issues occur after cleanup:

git push origin gh-pages-backup:gh-pages --force

Related

  • Phase 1 Issue: #253 (Complete)
  • Original Implementation Plan: lecture-python.myst#661
  • Phase 3: Enable force_orphan: true for 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)
Dominant language
No language data
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from QuantEcon/meta

All issues in QuantEcon/meta

Similar issues

More DevOps issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.