fix: accept any single-root docs.zip, not only html/ - #55
Merged
Conversation
publish.yml's extract keyed on the zip containing an `html/` directory
(`unzip -q "$f" 'html/*'`). Release assets are durable and long-lived, and
a repo migrating from python-copier-template's `_release.yml` carries
releases whose docs.zip is rooted at the TAG NAME instead:
mv html $GITHUB_REF_NAME
zip -r docs.zip $GITHUB_REF_NAME
Those releases were silently dropped from the reconstructed site — the
extract warned and skipped, and only the default branch is guarded, so the
deploy stayed green while every pre-migration version vanished from the
switcher. The assets cannot be re-cut on a repo with immutable releases.
Loosen the contract on the read side: a docs.zip must unzip to exactly one
top-level directory, whose CONTENTS become site/<version-name>; the
directory's NAME is ignored. Zero entries, several entries, or files loose
at the zip root are malformed and still warn + skip rather than guess.
docs.yml is unchanged and still packs html/.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Releases whose
docs.zipis not rooted athtml/were silently dropped from the reconstructed site.The bug
publish.yml's extract keyed on the zip containing anhtml/directory:Release assets are durable and long-lived, and a repo migrating from python-copier-template's
_release.ymlcarries releases rooted at the tag name instead:Those releases hit the
||branch and were skipped. Only the default branch is guarded (--required "$DEFAULT"), so the deploy stayed green while every pre-migration version vanished from the switcher — as seen on this blueapi run. The assets cannot be re-cut: these repos have immutable releases.The fix
Loosen the contract on the read side only. A
docs.zipmust unzip to exactly one top-level directory, whose contents becomesite/<version-name>; the directory's name is ignored. Zero entries, several entries, or files loose at the zip root are malformed → still warn + skip rather than guess.docs.ymlis unchanged and still packshtml/.Test fixture
v0.23.1rc1is a throwaway prerelease whosedocs.zipis rooted atv0.23.1rc1/, reproducing the layout above. It is marked prerelease + non-latest, andisPrereleaseis tag-name based (/\d(a|b|rc)/i), so it is excluded frompreferred/stableand cannot hijack the root redirect.main, run 30462749601): green, but! v0.23.1rc1: no html/ root in zip — skipping.v0.23.1rc1inswitcher.json.Also verified locally against generated fixture zips:
html/root, tag-name root, no explicit dir entries, dir name with a space → all extract; files loose at root, two top-level dirs, single root file, dir +.DS_Store, empty zip, non-zip → all warn + skip.Note: the
releasejob on thev0.23.1rc1tag is red by design —gh release upload --clobberhitCannot delete asset from an immutable release, which is what preserved the hand-made fixture asset.🤖 Generated with Claude Code