Skip to content

Commit c098f3f

Browse files
committed
Add GitHub Pages deployment workflow
1 parent 4148f98 commit c098f3f

4 files changed

Lines changed: 64 additions & 2 deletions

File tree

.github/workflows/deploy-pages.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Deploy docs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
env:
22+
DOCS_BASE_PATH: /${{ github.event.repository.name }}/
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v5
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Setup Node
30+
uses: actions/setup-node@v6
31+
with:
32+
node-version: 24
33+
cache: npm
34+
35+
- name: Setup Pages
36+
uses: actions/configure-pages@v5
37+
38+
- name: Install dependencies
39+
run: npm ci
40+
41+
- name: Build with VitePress
42+
run: npm run docs:build
43+
44+
- name: Upload artifact
45+
uses: actions/upload-pages-artifact@v4
46+
with:
47+
path: .vitepress/dist
48+
49+
deploy:
50+
name: Deploy
51+
needs: build
52+
runs-on: ubuntu-latest
53+
environment:
54+
name: github-pages
55+
url: ${{ steps.deployment.outputs.page_url }}
56+
steps:
57+
- name: Deploy to GitHub Pages
58+
id: deployment
59+
uses: actions/deploy-pages@v4

.vitepress/config.mts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { defineConfig } from "vitepress";
22

3+
const docsBase = process.env.DOCS_BASE_PATH ?? "/";
4+
35
const lectureItems = [
46
{ text: "Lecture 01", link: "/lectures/lecture-01-why-capable-agents-still-fail/" },
57
{ text: "Lecture 02", link: "/lectures/lecture-02-what-a-harness-actually-is/" },
@@ -35,6 +37,7 @@ const resourceItems = [
3537
];
3638

3739
export default defineConfig({
40+
base: docsBase,
3841
title: "Learn Harness Engineering",
3942
description:
4043
"A project-based course on designing the environments, state, verification, and control systems that make Codex and Claude Code reliable.",

README-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Harness engineering 指的是:围绕模型搭建一整套工作环境,让它
4848

4949
**第二步.** 把启动脚本复制进去:
5050

51-
- [`init.sh`](./resources/zh/templates/init.sh) —— 一条命令完成依赖安装、验证和启动
51+
- `resources/zh/templates/init.sh` —— 一条命令完成依赖安装、验证和启动
5252
-`INSTALL_CMD``VERIFY_CMD``START_CMD` 换成你自己的
5353

5454
**第三步.** 把进度日志复制进去:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ The idea is simple: instead of just writing prompts, give your agent a set of st
4848

4949
**Step 2.** Copy the startup script:
5050

51-
- [`init.sh`](./resources/en/templates/init.sh) — runs dependency install, verification, and startup in one shot
51+
- `resources/en/templates/init.sh` — runs dependency install, verification, and startup in one shot
5252
- Replace the `INSTALL_CMD`, `VERIFY_CMD`, and `START_CMD` with your actual commands
5353

5454
**Step 3.** Copy the progress log:

0 commit comments

Comments
 (0)