Repository navigation
feat: publish website to Cloudflare Workers with CI - #15
Merged
Merged
Conversation
areyoubugcoder
marked this pull request as ready for review
October 30, 2026 01:46
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.
网站新增 Cloudflare Workers Static Assets 发布入口,使用
https://mpider.followto.us/。GitHub Pages 仍按原有地址构建;Workers 发布前会固定独立域名重新运行 Astro 检查、构建与链接/SEO 验证,避免上传带 Pages 子路径的旧产物。新增固定版本 Wrangler、静态资源路由、自定义域名配置,以及
pnpm deploy:cloudflare命令。不存在的路径返回自定义 HTTP 404,目录页统一使用尾斜杠。Cloudflare 工作流在网站 PR 中执行无凭证 dry-run,相关变更合并到
main后自动发布,也支持在main上手动运行。正式发布前检查部署凭证,缺失时明确失败;PR 和其他分支不会发布。GitHub Pages 与 Cloudflare 独立构建和发布。路径过滤已将 Cloudflare 工作流纳入 CI 配置检查,避免触发无关客户端构建。验证:
pnpm deploy:cloudflare --dry-run通过,Astro 0 errors / warnings。pnpm verify通过。actionlint和 18 项 CI 路径过滤/结果汇总测试通过。启用自动发布前,须配置仓库 Actions Secret
CLOUDFLARE_API_TOKEN及 VariableCLOUDFLARE_ACCOUNT_ID。凭证与账户值不进入源码;本地 OAuth 登录文件不用于 CI。尚未验证持有 CI token 的正式发布。