Skip to content

fix: 部署时把题目页与分类页目录纳入发布产物#24

Merged
can4hou6joeng4 merged 1 commit into
mainfrom
fix/deploy-include-static-pages
Apr 16, 2026
Merged

fix: 部署时把题目页与分类页目录纳入发布产物#24
can4hou6joeng4 merged 1 commit into
mainfrom
fix/deploy-include-static-pages

Conversation

@can4hou6joeng4
Copy link
Copy Markdown
Owner

背景

主 PR #23 合并后发现 `q/.html` 和 `c/.html` 在 GitHub Pages 上全部 404,但 `sitemap.xml` 已经指向这些 URL,属于 soft 404,反而伤害 SEO。

根因

`.github/workflows/deploy.yml` 的 `Prepare site artifact` 步骤只按固定清单拷贝文件到 `dist/`,新增的 `q/` 与 `c/` 目录没被包含;同时 `paths:` 触发器也没有监听这两个目录,只在 `assets/` 或 `sitemap.xml` 等路径变化时才会触发部署。

修复

  • `paths:` 增加 `q/` 与 `c/`,让仅新增/修改题目页时也能触发部署
  • `Prepare site artifact` 步骤新增对 `q/`、`c/` 目录的拷贝(存在才拷,允许这两个目录都缺)

测试计划

@can4hou6joeng4 can4hou6joeng4 merged commit 3928a34 into main Apr 16, 2026
2 checks passed
@can4hou6joeng4 can4hou6joeng4 deleted the fix/deploy-include-static-pages branch April 16, 2026 16:59
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.

1 participant