Repository navigation
S3:双线部署(GitHub Actions + CF deploy hook + 每日重建 + README 核对表) - #5
Merged
Merged
Conversation
mapxn
force-pushed
the
feat/s2-a-pages-components
branch
2 times, most recently
from
October 26, 2026 11:00
a71a88b to
bc1f0f4
Compare
- .github/workflows/deploy.yml:push main / 每日 cron / workflow_dispatch 触发; 同一份 dist/ 双线发布(GitHub Pages 官方发布动作 + CF Pages deploy hook), 两个发布 job 互不依赖,一侧失败不阻塞另一侧(SPEC §0 / §9.2) - 每日重建:自动字段刷新 + archive/久未更新异常清单 + 全部外链巡检(连续失败点名,§9.2/§9.3) - 构建摘要:scripts/build-summary.ts + src/lib/build-summary.ts,写进 GitHub Actions summary - 链接健康:scripts/link-health.ts + src/lib/link-health.ts,连续失败计数走 actions/cache,不写仓库 - README:双线部署说明 + 两平台上线设置核对表(含 GitHub Pages 自定义域名栏留空的硬性项) - build-info:版本号改用 git describe --tags --always(去掉 --dirty:构建会改写自动字段缓存, 带 --dirty 会让双线版本号都变成 <sha>-dirty 且不可比) - 演练开关:dry_run 只构建出摘要、simulate_failure 注入单侧失败(验收 1/3)
mapxn
force-pushed
the
feat/s3-deployment
branch
from
October 26, 2026 12:07
e97642c to
e80cd55
Compare
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.
S3 子单(ONE-417):双线部署。基于
feat/s2-a-pages-components(PR #4,含 S1-A + S1-B + S2-A 的完整站点),因此本 PR 的 diff 只含 S3 的改动。内容
.github/workflows/deploy.yml(新)main+ 每日cron 17 19 * * *(UTC,北京 03:17)+workflow_dispatch(dry_run/simulate_failure演练开关)build→ {publish-github-pages(官方 Pages 发布动作) ‖publish-cloudflare-pages(CF Pages deploy hook) } +link-health(仅定时/手动)+summarysummary用if: always()逐侧标注结果secrets.CLOUDFLARE_PAGES_DEPLOY_HOOK读取,日志只打 HTTP 状态码;build里另有一道自检,仓库文件出现 deploy hook URL 直接失败dist/index.html、sitemap.xml、robots.txt必须存在;dist/CNAME存在即失败(GitHub Pages 自定义域名栏必须留空);并校验页脚版本号确实注入到了dist/index.htmlsrc/lib/link-health.ts+scripts/link-health.ts(新):§9.3 外链巡检,连续失败计数(阈值连续 2 次)与「反爬/限流需人工确认」分开,不硬拦、不改数据;跨运行状态交给actions/cache,不往仓库写src/lib/build-summary.ts+scripts/build-summary.ts(新):§9.2 / §9.3 构建摘要(自动字段刷新结果 + archive/久未更新异常清单 + 链接健康连续失败点名 + 两侧独立发布结果),写进$GITHUB_STEP_SUMMARYREADME.md:双线部署说明、演练用法与已知平台限制、两平台上线设置核对表(A. Cloudflare Pages / B. GitHub Pages 含自定义域名栏留空的硬性项 / C. 合并后首次验证)src/lib/build-info.ts:版本号去掉--dirty(理由见 commit);package.json加health:links/summary:build;.gitignore忽略三类运行产物本 PR 不做
不建 Cloudflare Pages 项目、不绑域名、不启用 GitHub Pages、不动仓库设置、不写 Secrets、不向
main写提交(自动字段缓存有变化时作为运行产物上传,由维护者随数据 PR 提交)。演练记录
见 ONE-417 评论。