更新部署依赖
Build and Deploy Documentation / build-and-deploy (push) Failing after 37s
Details
Build and Deploy Documentation / build-and-deploy (push) Failing after 37s
Details
This commit is contained in:
parent
5d7415078f
commit
1f01c61cde
|
|
@ -13,9 +13,21 @@ jobs:
|
|||
build-and-deploy:
|
||||
runs-on: ubuntu-act-latest
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: readout_program
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: Checkout readout_program
|
||||
uses: https://gitee.com/actions-mirror/checkout@v4
|
||||
with:
|
||||
path: readout_program
|
||||
|
||||
- name: Checkout rbpu_datasheet
|
||||
uses: https://gitee.com/actions-mirror/checkout@v4
|
||||
with:
|
||||
repository: ${{ github.repository_owner }}/rbpu_datasheet
|
||||
path: rbpu_datasheet
|
||||
|
||||
- name: Configure pip mirror
|
||||
run: pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
|
|
@ -24,7 +36,7 @@ jobs:
|
|||
run: pip install --retries 3 -r requirements.txt
|
||||
|
||||
- name: Build documentation
|
||||
run: python doc_builder/build.py
|
||||
run: python build.py
|
||||
|
||||
- name: Deploy to Caddy
|
||||
env:
|
||||
|
|
|
|||
12
CLAUDE.md
12
CLAUDE.md
|
|
@ -10,11 +10,11 @@ Markdown 纯文本写作 + Git 版本控制 + Python 构建管道 → 自包含
|
|||
### 目录结构
|
||||
```
|
||||
project.yaml # 项目元数据与章节列表
|
||||
build.py # 构建入口(项目根目录)
|
||||
chapters/ # Markdown 章节源文件(唯一编辑目标)
|
||||
assets/ # 图片资源
|
||||
data/ # 结构化数据源(CSV/YAML/JSON,通过 @import 引用)
|
||||
doc_builder/ # Python 构建工具
|
||||
build.py # 构建入口
|
||||
templates/ # HTML 模板
|
||||
themes/ # CSS 样式
|
||||
renderers/ # 自定义渲染器(@import / 代码块渲染)
|
||||
|
|
@ -40,6 +40,12 @@ output/ # 构建产物(gitignore)
|
|||
- **禁止绝对路径**(尤其是 Windows 盘符路径如 `D:/code/...`)
|
||||
- 构建时自动内嵌为 base64,生成自包含 HTML
|
||||
|
||||
### README 规范
|
||||
- README.md 必须包含 **CI/CD 状态徽章**(指向 Gitea Actions workflow 的 badge URL)
|
||||
- README.md 必须包含 **在线文档/部署链接**,指向文档的实际访问地址
|
||||
- 徽章格式: `[](<gitea_server>/<org>/<repo>/actions)`
|
||||
- 部署链接格式: `📖 **在线文档**: [<url>](<url>)`
|
||||
|
||||
### 交叉引用
|
||||
- 内部引用: `详见 [标题锚点](#标题锚点)`
|
||||
- 外部引用: `[文档名](path/to/doc.md)`
|
||||
|
|
@ -58,7 +64,7 @@ output/ # 构建产物(gitignore)
|
|||
pip install -r requirements.txt
|
||||
|
||||
# 构建 HTML
|
||||
python doc_builder/build.py
|
||||
python build.py
|
||||
|
||||
# 输出: output/<标题>.html
|
||||
```
|
||||
|
|
@ -91,7 +97,7 @@ python doc_builder/build.py
|
|||
|
||||
| 修改内容 | 编辑目标 | 构建方式 |
|
||||
|:---|:---|:---|
|
||||
| 正文内容 | `chapters/*.md` | `python doc_builder/build.py` |
|
||||
| 正文内容 | `chapters/*.md` | `python build.py` |
|
||||
| 章节顺序 | `project.yaml` → `chapters:` 列表 | 同上 |
|
||||
| 图片 | `assets/` | 同上(自动内嵌) |
|
||||
| 结构化数据 | `data/*.csv` / `data/*.yaml` / `data/*.json` | 同上(通过 @import 注入) |
|
||||
|
|
|
|||
|
|
@ -18,11 +18,11 @@
|
|||
|
||||
```
|
||||
project.yaml # 项目配置(标题、作者、版本、章节列表)
|
||||
build.py # 构建入口(项目根目录)
|
||||
chapters/ # Markdown 章节源文件
|
||||
assets/ # 图片资源
|
||||
data/ # 结构化数据源(CSV/YAML/JSON,通过 @import 引用)
|
||||
doc_builder/ # Python 构建工具
|
||||
build.py # 构建入口
|
||||
templates/ # HTML 模板(含 A4 封面)
|
||||
themes/ # CSS 样式(屏幕 + 打印)
|
||||
renderers/ # 自定义渲染器(@import / 代码块)
|
||||
|
|
@ -40,7 +40,7 @@ output/ # 构建产物(.gitignore)
|
|||
pip install -r requirements.txt
|
||||
|
||||
# 2. 构建
|
||||
python doc_builder/build.py
|
||||
python build.py
|
||||
|
||||
# 3. 打开 output/<标题>.html 即可浏览
|
||||
```
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Docs as Code — 构建入口
|
|||
→ 组装 → 注入锚点 → 提取目录 → 模板渲染 → 自包含 HTML 报告。
|
||||
|
||||
用法:
|
||||
python doc_builder/build.py
|
||||
python build.py
|
||||
|
||||
输出:
|
||||
output/<标题>.html (自包含 HTML,可离线分发)
|
||||
|
|
@ -27,7 +27,7 @@ import yaml
|
|||
from jinja2 import Environment, FileSystemLoader, select_autoescape
|
||||
|
||||
# ---------- 路径配置 ----------
|
||||
PROJECT_ROOT = Path(__file__).resolve().parent.parent
|
||||
PROJECT_ROOT = Path(__file__).resolve().parent
|
||||
CHAPTERS_DIR = PROJECT_ROOT / "chapters"
|
||||
ASSETS_DIR = PROJECT_ROOT / "assets"
|
||||
OUTPUT_DIR = PROJECT_ROOT / "output"
|
||||
Loading…
Reference in New Issue