File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99env :
1010 BUILD_TYPE : Release
1111
12+ permissions :
13+ contents : read
14+
15+ concurrency :
16+ group : ci-${{ github.workflow }}-${{ github.ref }}
17+ cancel-in-progress : true
18+
1219jobs :
1320 build :
1421 name : ${{ matrix.os }} - ${{ matrix.compiler }}
Original file line number Diff line number Diff line change 1212 - " CONTRIBUTING.md"
1313 - " CONTRIBUTING.zh.md"
1414 - " book.json"
15- - " .github/workflows/docs.yml"
15+ - " .gitbook.yaml"
16+ - " package.json"
17+ - " package-lock.json"
18+ - " .github/workflows/pages.yml"
1619 workflow_dispatch :
1720
1821permissions :
@@ -29,13 +32,35 @@ jobs:
2932 runs-on : ubuntu-latest
3033 steps :
3134 - uses : actions/checkout@v4
35+ with :
36+ sparse-checkout : |
37+ docs/en
38+ docs/zh
39+ examples/01-cmake-modern/README.md
40+ examples/02-memory-cache/README.md
41+ examples/03-modern-cpp/README.md
42+ examples/04-simd-vectorization/README.md
43+ examples/05-concurrency/README.md
44+ README.md
45+ README.zh-CN.md
46+ SUMMARY.md
47+ CONTRIBUTING.md
48+ CONTRIBUTING.zh.md
49+ book.json
50+ .gitbook.yaml
51+ package.json
52+ package-lock.json
53+
54+ - name : Setup Pages
55+ uses : actions/configure-pages@v5
3256
3357 - uses : actions/setup-node@v4
3458 with :
35- node-version : 20
59+ node-version : 22
60+ cache : npm
3661
3762 - name : Install honkit
38- run : npm install honkit
63+ run : npm ci
3964
4065 - name : Build docs
4166 run : npx honkit build . _site
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ English | [简体中文](README.zh-CN.md) | [GitBook Sync Guide](docs/en/gitbook
55[ ![ Build] ( https://img.shields.io/github/actions/workflow/status/LessUp/cpp-high-performance-guide/build.yml?branch=main&style=for-the-badge&logo=githubactions&logoColor=white&label=Build )] ( https://github.com/LessUp/cpp-high-performance-guide/actions/workflows/build.yml )
66[ ![ Benchmarks] ( https://img.shields.io/github/actions/workflow/status/LessUp/cpp-high-performance-guide/benchmark.yml?branch=main&style=for-the-badge&logo=speedtest&logoColor=white&label=Benchmarks )] ( https://github.com/LessUp/cpp-high-performance-guide/actions/workflows/benchmark.yml )
77[ ![ Sanitizers] ( https://img.shields.io/github/actions/workflow/status/LessUp/cpp-high-performance-guide/sanitizers.yml?branch=main&style=for-the-badge&logo=githubactions&logoColor=white&label=Sanitizers )] ( https://github.com/LessUp/cpp-high-performance-guide/actions/workflows/sanitizers.yml )
8- [ ![ Docs] ( https://img.shields.io/github/actions/workflow/status/LessUp/cpp-high-performance-guide/docs .yml?branch=main&style=for-the-badge&logo=githubpages&logoColor=white&label=Docs )] ( https://lessup.github.io/cpp-high-performance-guide/ )
8+ [ ![ Docs] ( https://img.shields.io/github/actions/workflow/status/LessUp/cpp-high-performance-guide/pages .yml?branch=main&style=for-the-badge&logo=githubpages&logoColor=white&label=Docs )] ( https://lessup.github.io/cpp-high-performance-guide/ )
99
1010A comprehensive collection of high-performance computing optimization examples and best practices for modern C++20.
1111
Original file line number Diff line number Diff line change 55[ ![ Build] ( https://img.shields.io/github/actions/workflow/status/LessUp/cpp-high-performance-guide/build.yml?branch=main&style=for-the-badge&logo=githubactions&logoColor=white&label=Build )] ( https://github.com/LessUp/cpp-high-performance-guide/actions/workflows/build.yml )
66[ ![ Benchmarks] ( https://img.shields.io/github/actions/workflow/status/LessUp/cpp-high-performance-guide/benchmark.yml?branch=main&style=for-the-badge&logo=speedtest&logoColor=white&label=Benchmarks )] ( https://github.com/LessUp/cpp-high-performance-guide/actions/workflows/benchmark.yml )
77[ ![ Sanitizers] ( https://img.shields.io/github/actions/workflow/status/LessUp/cpp-high-performance-guide/sanitizers.yml?branch=main&style=for-the-badge&logo=githubactions&logoColor=white&label=Sanitizers )] ( https://github.com/LessUp/cpp-high-performance-guide/actions/workflows/sanitizers.yml )
8- [ ![ Docs] ( https://img.shields.io/github/actions/workflow/status/LessUp/cpp-high-performance-guide/docs .yml?branch=main&style=for-the-badge&logo=githubpages&logoColor=white&label=Docs )] ( https://lessup.github.io/cpp-high-performance-guide/ )
8+ [ ![ Docs] ( https://img.shields.io/github/actions/workflow/status/LessUp/cpp-high-performance-guide/pages .yml?branch=main&style=for-the-badge&logo=githubpages&logoColor=white&label=Docs )] ( https://lessup.github.io/cpp-high-performance-guide/ )
99
1010面向现代 C++20 的高性能计算优化示例与最佳实践合集。
1111
Original file line number Diff line number Diff line change 1+ # 2026-03-10 GitHub Pages 优化
2+
3+ ## 变更
4+
5+ ### GitHub Pages 工作流优化 (` pages.yml ` )
6+ - ** Sparse-checkout** :仅检出文档相关文件(docs/、examples/* /README.md、README.md 等),跳过 tests/、benchmarks/、cmake/、src/ 等大目录,显著减少 CI 检出时间和磁盘占用。
7+ - ** npm 缓存** :` actions/setup-node ` 启用 ` cache: npm ` ,后续构建复用 node_modules 缓存,加速 honkit 安装。
8+ - ** 锁定 HonKit 版本** :新增 ` package.json ` + ` package-lock.json ` ,将 honkit 固定为 ` ^3.7.1 ` ,使用 ` npm ci ` 替代 ` npm install ` ,确保可复现构建。
9+ - ** 补全 paths 触发条件** :新增 ` .gitbook.yaml ` 、` package.json ` 、` package-lock.json ` 触发路径。
10+
11+ ### Docs 徽章修复
12+ - 修复 ` README.md ` 和 ` README.zh-CN.md ` 中 Docs 徽章链接:` docs.yml ` → ` pages.yml ` ,与实际工作流文件名一致。
13+
14+ ### 新增文件
15+ - ` package.json ` — 声明 honkit 开发依赖,提供 ` docs:build ` / ` docs:serve ` 脚本。
16+ - ` package-lock.json ` — 锁定依赖版本,支持 npm 缓存和可复现安装。
17+
18+ ## 原因
19+
20+ - 原工作流每次全量检出整个仓库(含 C++ 源码、测试、基准测试),仅为构建 Markdown 文档,浪费 CI 资源。
21+ - ` npm install honkit ` 无版本锁定,每次构建可能安装不同版本,存在不可复现风险。
22+ - Docs 徽章引用了不存在的 ` docs.yml ` ,导致徽章状态始终显示异常。
You can’t perform that action at this time.
0 commit comments