Conversation
…ng validation logic Remove assertions for deprecated `mode`, `upload_strategy`, `artifact_count`, and `artifact_manifest` outputs. Replace with `result_json` validation using grep. Update input names from `artifact_format`/`artifact_name` to `upload`/`archive_name`. Replace `preview_repo_mode` job with `v4_compatibility` job that demonstrates fallback pattern for users migrating from repo-mode usage.
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.
Summary
This PR is the full
v4->v5rewrite ofhtml-preview-action.The branch started by modernizing the action implementation and test setup, then moved the action to a new artifact-first architecture, and finally simplified the public API around the
v5direction: previewing HTML generated during CI as GitHub Actions artifacts.Compared to
v4,v5is a breaking release with a narrower, clearer scope.v4 -> v5 highlights
What
v4was designed forv4was built around previewing checked-in repository files by constructing anhtmlpreview.github.ioURL that points at a GitHub blob URL.That only works for content that
htmlpreview.github.iocan read publicly from GitHub, which made it a reasonable fit for checked-in repo files but not for CI-generated preview payloads or private artifact-like output.What
v5is designed forv5is intentionally focused on the most common and best-supported use case this project wants to support going forward:site_rootThe new implementation:
html_filewithinsite_rootRuntime and tooling modernization
src/dist/index.mjstsconfig.jsonandtsdownbundlingpnpmPublic API changes
The final
v5API is simpler and more explicit:modeartifact_formatuploadwith supported values:autoarchiveartifact_nametoarchive_nameOutput changes
Kept common outputs:
urlartifact_urlartifact_idartifact_namediscovered_files_countskipped_references_countcomment_bodyAdded:
result_jsonRemoved older / more confusing outputs:
modeupload_strategyartifact_countartifact_namesartifact_idsartifact_urlsartifact_manifestsource_urlDocumentation updates
The README was rewritten for
v5to explain:v4repo-mode usageThe migration section now includes:
Test and workflow changes
This PR also substantially upgrades verification coverage:
.github/workflows/test.ymlto run quality checks firstv4_compatibilityworkflow job that validates the documented repo/blob fallback URL constructionRepository cleanup
.gitignorepackage-lock.jsonpnpm-lock.yamlWhy this change
The old design was centered on checked-in repo files that could be fetched publicly through
htmlpreview.github.io.v5makes the action more explicit and maintainable by focusing on CI-generated HTML preview artifacts, while still giving formerv4users a documented fallback path when they still want the old checked-in-file behavior.Verification
Verified with:
pnpm format:checkpnpm testpnpm typecheckpnpm lintpnpm buildMigration notes
For users upgrading from
v4:v5no longer supports repo/blob mode inside the action itselfv4or use the documented workflow fallback that constructs: