Skip to content

Configure Hugo GitHub Pages deployment and custom domain publishing - #7

Merged
lazyparser merged 2 commits into
masterfrom
copilot/fix-custom-domain-issue
Sep 14, 2026
Merged

lazyparser merged 2 commits into
masterfrom
copilot/fix-custom-domain-issue

Conversation

Copilot AI commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

合并后 hellollvm.org 未反映更新,根因是仓库只有 Hugo 构建流程,没有将 public/ 部署到 GitHub Pages。此次变更补齐发布链路,并确保自定义域名随构建产物一起发布。

  • Deployment workflow(新增)

    • 新增 .github/workflows/hugo-deploy.yml,在 main/master push 或手动触发时执行:
      • 配置 Pages 环境
      • 构建 Hugo 站点
      • 上传 public/ 制品
      • 部署到 GitHub Pages
    • 为第三方 action 使用不可变 commit SHA,降低上游漂移风险。
  • Custom domain publishing(新增)

    • 新增 static/CNAME,内容为 hellollvm.org,确保 Hugo 构建后产物包含 public/CNAME,由 Pages 正确应用自定义域名。
  • Build semantics(调整)

    • 部署 workflow 使用标准生产构建参数(hugo --gc --minify),与站点现有 Hugo 配置一致,避免在 workflow 中覆盖站点域名配置。
# .github/workflows/hugo-deploy.yml
- name: Build with Hugo
  run: hugo --gc --minify

- name: Upload artifact
  uses: actions/upload-pages-artifact@v3
  with:
    path: ./public

Copilot AI and others added 2 commits September 14, 2026 08:55
Co-authored-by: lazyparser <1802104+lazyparser@users.noreply.github.com>
Co-authored-by: lazyparser <1802104+lazyparser@users.noreply.github.com>
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