Skip to content

持续集成:让 Pages 只发布通过验证的 main - #16

Merged
amazing-fish merged 3 commits into
mainfrom
codex/ci-pages-gate
Jul 11, 2026
Merged

amazing-fish merged 3 commits into
mainfrom
codex/ci-pages-gate

Conversation

@amazing-fish

@amazing-fish amazing-fish commented Jul 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • 为 main push、面向 main 的 PR 和 workflow_dispatch 增加统一 validate job
  • 只有 main ref 在 validate 通过后才构建 Pages artifact 并部署,PR 和其他手动 ref 只验证
  • workflow 默认权限收敛为 contents: read,pages/id-token 写权限仅授予 deploy job
  • checkout、setup-node 与 Pages Actions 全部固定到带版本注释的 40 位 commit SHA
  • 新增 CI workflow 契约并纳入 validate-project.mjs
  • 文档补充本地等价验证、失败诊断、部署边界与分支保护启用时机

Verification

  • Python yaml.safe_load .github/workflows/pages.yml
  • node apps/yi/tests/ci-workflow-contract.mjs
  • node apps/yi/tests/validate-project.mjs
  • git diff --check main..HEAD

本地结果:全部通过。

Risk

中。该 PR 改变 Pages 发布门禁与 Actions 版本;PR 本身的远端 Actions 是验证 runner/权限组合的必要证据。部署路径仍为 apps/yi。

Non-goals

  • 本 PR 不立即启用 main required status check,避免 workflow 尚未进入 main 时锁死合并
  • 不修改站点运行时行为
  • 不自动合并

Follow-up

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8f0010c7f2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/pages.yml
@amazing-fish
amazing-fish changed the base branch from codex/data-contracts to main July 11, 2026 06:48
@amazing-fish
amazing-fish merged commit 5a0d80b into main Jul 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants