HTML Recovery Tool: Restore lecture sites from GitHub Release assets

Aperta
#27 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
git, github-actions, shell

Direzione di ricerca

Inizia da PLAN.md:116 e confronta la realizzazione qui con il trasferimento del lavoro a workflow-backups, in particolare src/backup/repo_matcher.py, la sua integrazione S3 e i test. Leggi publish-gh-pages/action.yml:80-154 e README.md:76-92 per confermare entrambi i formati dei release-asset e la loro denominazione; il lavoro è completato quando è stata decisa la destinazione, il contratto del producer è documentato e il ripristino può verificare, estrarre e distribuire gli archivi supportati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement low-priority

Producer live: lecture-python.myst, lecture-python-intro, lecture-python-advanced.myst, lecture-python-programming, lecture-python-programming.fr, lecture-jax, lecture-dp and continuous_time_mcs pass create-release-assets: 'true' to publish-gh-pages, and each release carries the triple — tarball, SHA256 checksum, JSON manifest (name, tag, commit, timestamp, size_mb, file_count, repository). The step that builds the triple is unchanged from v0.8.0 to main (only the upload action's pin has moved), so asset shape is identical across the pins those eight use (v0, v0.11.1). Missing is the consumer; built HTML is costly to reproduce, so a downed site recovers fastest from the archive.

Decision: home (2026-09-25)

Build it here, as the inverse of publish-gh-pages. A Pages site whose source is GitHub Actions can only be deployed from an Actions run in its own repository: deploy-pages needs that workflow's pages: write and id-token: write. So the restore has to be a workflow in each lecture repo, which makes it an action in this repo, next to the producer whose asset contract it reads. Fixes to that contract (see Gaps) and the consumer then land in the same PR, with no cross-repo version skew.

  • Not workflow-backups. That repo runs scheduled git-mirror backups to S3, and its own PLAN.md already assigns this tool to this issue. The release archives do not need an off-GitHub copy: the sources are the backup.
  • QuantEcon/cli later, if wanted. Listing recovery points across repos (gh release list) and triggering restores in several repos (gh workflow run restore.yml) are operator conveniences a qe command could wrap once the restore workflow exists. Not in this issue.

The custom domain needs nothing from the restore: with an Actions Pages source it lives in Settings → Pages, not in a CNAME file.

Scope

  • restore-gh-pages composite action: download a release's archive and checksum (gh release download), verify the SHA256 before anything is deployed, extract, and deploy through the same configure-pages → upload-pages-artifact → deploy-pages path as publish-gh-pages. Inputs: tag (default: the latest release), asset-name (same default as publish-gh-pages, <repo>-html), github-token.
  • templates/restore.yml: workflow_dispatch with a tag input; contents: read, pages: write, id-token: write; shares publish.yml's pages concurrency group so a restore and a publish cannot race. Lecture repos add it before they need it.
  • Namespace the checksum and manifest names by tag (Gaps, third item), with the restore action still reading the current tag-less names on existing releases.
  • Test end to end in the canary (test-actions-lecture-intro, which runs publish-gh-pages@v0 without release assets today): enable create-release-assets, publish, then restore an earlier tag.
  • Contract note in the user manual's publish-gh-pages chapter: tracked in #190.

Gaps

Two asset formats. lecture-julia.myst, lecture-python.zh-cn, lecture-intro.zh-cn, lecture-python-programming.fa hand-roll the triple in their own publish.yml (tar + sha256sum + heredoc manifest, uploaded via softprops/action-gh-release directly, @v2 in the first, @v3 in the rest): same <name>-html-<tag>.tar.gz, but checksum and manifest are the bare html-checksum.txt / html-manifest.json with no asset-name prefix, and the manifest omits name and repository. Handle both, or migrate those four onto publish-gh-pages first.

Tag-triggered publishes only. publish-gh-pages/action.yml:93-97 skips off-tag with a warning, and lecture-dp's publish.yml also accepts workflow_dispatch, so a manual publish there leaves no recovery point. Nine active repos attach nothing — lecture-datascience.myst, lecture-dle, lecture-dps, lecture-dynamics, lecture-eqm, lecture-stats, lecture-tools-techniques, lecture-python-programming.ml, lecture-python-programming.zh-cn deploy via peaceiris/actions-gh-pages or actions/deploy-pages with no archive step, outside recovery until they adopt create-release-assets.

Checksum/manifest names carry no tag. publish-gh-pages/action.yml:119-120 builds both from ASSET_NAME alone while the archive name at :111 includes the tag, so one repo's recovery points collide in a directory — namespace by repo and tag.

Related

  • Producer publish-gh-pages/action.yml:83-157 (create-release-assets): guards :90-101, naming :103-111, checksum :126, manifest :129-138, upload via softprops/action-gh-release SHA-pinned to v3.0.3 at :150
  • publish-gh-pages/README.md:77-93 describes the triple
  • workflow-backups PLAN.md ("Two Pillars") names this issue as the HTML-recovery pillar
Lingua principale
Shell
Stelle
0
Fork
1
Merge medio
20h 3m
PR unite (30g)
48

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di QuantEcon/actions

Tutte le issue di QuantEcon/actions

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.