Skip to content

Commit 201eea8

Browse files
author
shijiashuai
committed
chore: GitHub Pages optimization & workflow standardization
1 parent cebfbef commit 201eea8

File tree

9 files changed

+53
-8
lines changed

9 files changed

+53
-8
lines changed

.github/workflows/pages.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ on:
66
paths:
77
- '*.md'
88
- 'docs/**'
9+
- 'changelog/**'
910
- '_config.yml'
11+
- '404.md'
1012
- '.github/workflows/pages.yml'
1113
workflow_dispatch:
1214

@@ -17,7 +19,7 @@ permissions:
1719

1820
concurrency:
1921
group: pages
20-
cancel-in-progress: false
22+
cancel-in-progress: true
2123

2224
jobs:
2325
build:
@@ -30,6 +32,7 @@ jobs:
3032
sparse-checkout: |
3133
*.md
3234
_config.yml
35+
404.md
3336
docs
3437
changelog
3538
LICENSE

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ Thumbs.db
3636
# Docker
3737
docker-compose.override.yml
3838

39+
# Jekyll
40+
_site/
41+
.jekyll-cache/
42+
.jekyll-metadata
43+
3944
# Environment & secrets
4045
.env
4146
.env.*

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ description: WebRTC 项目各版本变更记录
1212

1313
| 日期 | 摘要 |
1414
|:-----|:-----|
15+
| [2026-03-10](changelog/2026-03-10_pages-optimization.md) | Pages 工作流优化、CI badge 修正、_config.yml 清理、Pages 徽章 |
1516
| [2026-03-09](changelog/2026-03-09_pages-and-quality.md) | GitHub Pages 全面优化、golangci-lint、测试覆盖率增强、文档同步 |
1617
| [2026-03-09](changelog/2026-03-09_stability-and-security.md) | writePump 协程泄露修复、房间/人数上限、WebSocket 自动重连 |
1718
| [2026-02-13](changelog/2026-02-13.md) | 全面优化与重构(后端提取 broadcastMembers、前端重构、CI 增强、Docker) |

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# WebRTC
22

3-
[![Go CI](https://github.com/LessUp/webrtc/actions/workflows/go.yml/badge.svg)](https://github.com/LessUp/webrtc/actions/workflows/go.yml)
3+
[![Go CI](https://github.com/LessUp/webrtc/actions/workflows/ci.yml/badge.svg)](https://github.com/LessUp/webrtc/actions/workflows/ci.yml)
4+
[![Pages](https://github.com/LessUp/webrtc/actions/workflows/pages.yml/badge.svg)](https://lessup.github.io/webrtc/)
45
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
56
![Go](https://img.shields.io/badge/Go-1.22+-00ADD8?logo=go&logoColor=white)
67
![WebRTC](https://img.shields.io/badge/WebRTC-Enabled-333333?logo=webrtc&logoColor=white)
@@ -93,7 +94,7 @@ webrtc/
9394
│ ├── guide.md # Architecture, frontend, media, recording
9495
│ └── signaling.md # Signaling protocol deep dive
9596
├── .github/workflows/ # CI/CD
96-
│ ├── go.yml # Go build + test + lint
97+
│ ├── ci.yml # Go build + test + lint
9798
│ └── pages.yml # GitHub Pages deployment
9899
├── changelog/ # Change logs
99100
├── Dockerfile # Multi-stage build

README.zh-CN.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
[English](README.md) | 简体中文 | [📖 在线文档](https://lessup.github.io/webrtc/)
44

5-
[![Go CI](https://github.com/LessUp/webrtc/actions/workflows/go.yml/badge.svg)](https://github.com/LessUp/webrtc/actions/workflows/go.yml)
5+
[![Go CI](https://github.com/LessUp/webrtc/actions/workflows/ci.yml/badge.svg)](https://github.com/LessUp/webrtc/actions/workflows/ci.yml)
6+
[![Pages](https://github.com/LessUp/webrtc/actions/workflows/pages.yml/badge.svg)](https://lessup.github.io/webrtc/)
67
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
78
![Go](https://img.shields.io/badge/Go-1.22+-00ADD8?logo=go&logoColor=white)
89
![WebRTC](https://img.shields.io/badge/WebRTC-Enabled-333333?logo=webrtc&logoColor=white)
@@ -121,7 +122,7 @@ webrtc/
121122
│ ├── guide.md # 项目技术说明(架构、前端、媒体、录制)
122123
│ └── signaling.md # 信令协议与房间管理详解
123124
├── .github/workflows/ # CI/CD
124-
│ ├── go.yml # Go 构建 + 测试 + lint
125+
│ ├── ci.yml # Go 构建 + 测试 + lint
125126
│ └── pages.yml # GitHub Pages 部署
126127
├── changelog/ # 变更日志
127128
├── Dockerfile # 多阶段构建

_config.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ show_downloads: false
1616
# SEO & social
1717
author: LessUp
1818
lang: zh-CN
19-
logo: /webrtc/assets/og-banner.png
2019

2120
# Markdown rendering
2221
markdown: kramdown
@@ -36,6 +35,10 @@ exclude:
3635
- .editorconfig
3736
- .gitattributes
3837
- .golangci.yml
38+
- .vscode/
39+
- .github/
3940
- vendor/
4041
- bin/
42+
- _site/
43+
- .jekyll-cache/
4144
- "*.exe"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# 2026-03-10 GitHub Pages 优化
2+
3+
## 修复
4+
5+
1. **CI badge URL 修正**`README.md``README.zh-CN.md``index.md` 中 badge 链接从不存在的 `go.yml` 修正为实际的 `ci.yml`
6+
2. **项目结构描述修正** — 三处项目结构树中 `go.yml``ci.yml`
7+
3. **`_config.yml` 移除不存在的 logo**`assets/og-banner.png` 文件不存在,移除引用避免 SEO 元数据指向 404
8+
4. **`.gitignore` 补充 Jekyll 产物** — 添加 `_site/``.jekyll-cache/``.jekyll-metadata`
9+
10+
## 优化
11+
12+
5. **`pages.yml` cancel-in-progress**`false``true`,避免过时提交的部署阻塞新提交
13+
6. **`pages.yml` paths 触发补全** — 添加 `changelog/**``404.md` 路径触发,确保子页面变更也触发部署
14+
7. **`pages.yml` sparse-checkout 补全** — 添加 `404.md`,确保 404 页面正确部署
15+
8. **`_config.yml` exclude 补全** — 添加 `.vscode/``.github/``_site/``.jekyll-cache/`,减少 Jekyll 构建范围
16+
9. **添加 Pages badge**`README.md``README.zh-CN.md``index.md` 添加 GitHub Pages 部署状态徽章
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Workflow 深度标准化
2+
3+
日期:2026-03-10
4+
5+
## 变更内容
6+
7+
- CI workflow 重命名:`go.yml``ci.yml`
8+
- CI workflow 统一 `permissions: contents: read``concurrency` 配置
9+
- Pages workflow 补充 `actions/configure-pages@v5` 步骤
10+
- Pages workflow 添加 `paths` 触发过滤,减少无效构建
11+
12+
## 背景
13+
14+
全仓库第二轮 GitHub Actions 深度标准化:统一命名、权限、并发、路径过滤与缓存策略。

index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ description: 基于 Go + WebRTC 的实时音视频示例项目,覆盖信令、
1515
</p>
1616

1717
<p>
18-
<a href="https://github.com/LessUp/webrtc/actions/workflows/go.yml"><img src="https://github.com/LessUp/webrtc/actions/workflows/go.yml/badge.svg" alt="Go CI"></a>
18+
<a href="https://github.com/LessUp/webrtc/actions/workflows/ci.yml"><img src="https://github.com/LessUp/webrtc/actions/workflows/ci.yml/badge.svg" alt="Go CI"></a>
19+
<a href="https://github.com/LessUp/webrtc/actions/workflows/pages.yml"><img src="https://github.com/LessUp/webrtc/actions/workflows/pages.yml/badge.svg" alt="Pages"></a>
1920
<a href="https://github.com/LessUp/webrtc/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"></a>
2021
<img src="https://img.shields.io/badge/Go-1.22+-00ADD8?logo=go&logoColor=white" alt="Go">
2122
<img src="https://img.shields.io/badge/WebRTC-Enabled-333333?logo=webrtc&logoColor=white" alt="WebRTC">
@@ -156,7 +157,7 @@ webrtc/
156157
│ ├── guide.md # 项目技术说明(架构、前端、媒体、录制)
157158
│ └── signaling.md # 信令协议与房间管理详解
158159
├── .github/workflows/ # CI/CD
159-
│ ├── go.yml # Go 构建 + 测试 + 静态分析
160+
│ ├── ci.yml # Go 构建 + 测试 + 静态分析
160161
│ └── pages.yml # GitHub Pages 部署
161162
├── changelog/ # 变更日志
162163
├── Dockerfile # 多阶段构建

0 commit comments

Comments
 (0)