ci: block Pages deploy when site reference check fails - #1
Merged
Merged
Conversation
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.
背景
run 35203283375 中 CI 的 site-links 检查失败,但同一提交的 Pages 部署照常成功——因为 pages.yml 独立于 ci.yml 触发,部署前不做任何站点完整性校验。这次只是 checker 自身的 bug,属于侥幸;若将来推上 main 的提交真的有断链或缺文件,坏页面会先上线。
改动
在 pages.yml 的 checkout 之后、stage/upload 之前增加:
node scripts/check_site.mjs(与 CI 同一个检查:断链、缺失引用、deck 字节一致)检查失败则整个 deploy job 直接退出,不会上传/部署 artifact。
不做的事