Skip to content

Harness engineering beginner tutorial, from 0 to 1

Add GitHub Pages deployment workflow

sanbuphyc098f3ffec11
diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml
new file mode 100644
index 0000000..9e4e346
--- /dev/null
+++ b/.github/workflows/deploy-pages.yml
@@ -0,0 +1,59 @@
+name: Deploy docs to GitHub Pages
+
+on:
+ push:
+ branches:
+ - main
+ workflow_dispatch:
+
+permissions:
+ contents: read
+ pages: write
+ id-token: write
+
+concurrency:
+ group: pages
+ cancel-in-progress: false
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ env:
+ DOCS_BASE_PATH: /${{ github.event.repository.name }}/
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v5
+ with:
+ fetch-depth: 0
+
+ - name: Setup Node
+ uses: actions/setup-node@v6
+ with:
+ node-version: 24
+ cache: npm
+
+ - name: Setup Pages
+ uses: actions/configure-pages@v5
+
+ - name: Install dependencies
+ run: npm ci
+
+ - name: Build with VitePress
+ run: npm run docs:build
+
+ - name: Upload artifact
+ uses: actions/upload-pages-artifact@v4
+ with:
+ path: .vitepress/dist
+
+ deploy:
+ name: Deploy
+ needs: build
+ runs-on: ubuntu-latest
+ environment:
+ name: github-pages
+ url: ${{ steps.deployment.outputs.page_url }}
+ steps:
+ - name: Deploy to GitHub Pages
+ id: deployment
+ uses: actions/deploy-pages@v4
diff --git a/.vitepress/config.mts b/.vitepress/config.mts
index 00cce2c..c5dccfc 100644
--- a/.vitepress/config.mts
+++ b/.vitepress/config.mts
@@ -1,5 +1,7 @@
import { defineConfig } from "vitepress";
+const docsBase = process.env.DOCS_BASE_PATH ?? "/";
+
const lectureItems = [
{ text: "Lecture 01", link: "/lectures/lecture-01-why-capable-agents-still-fail/" },
{ text: "Lecture 02", link: "/lectures/lecture-02-what-a-harness-actually-is/" },
@@ -35,6 +37,7 @@ const resourceItems = [
];
export default defineConfig({
+ base: docsBase,
title: "Learn Harness Engineering",
description:
"A project-based course on designing the environments, state, verification, and control systems that make Codex and Claude Code reliable.",
diff --git a/README-CN.md b/README-CN.md
index c29a1c6..0ccb984 100644
--- a/README-CN.md
+++ b/README-CN.md
@@ -48,7 +48,7 @@ Harness engineering 指的是:围绕模型搭建一整套工作环境,让它
**第二步.** 把启动脚本复制进去:
-- [`init.sh`](./resources/zh/templates/init.sh) —— 一条命令完成依赖安装、验证和启动
+- `resources/zh/templates/init.sh` —— 一条命令完成依赖安装、验证和启动
- 把 `INSTALL_CMD`、`VERIFY_CMD`、`START_CMD` 换成你自己的
**第三步.** 把进度日志复制进去:
diff --git a/README.md b/README.md
index 514574b..cdad9ed 100644
--- a/README.md
+++ b/README.md
@@ -48,7 +48,7 @@ The idea is simple: instead of just writing prompts, give your agent a set of st
**Step 2.** Copy the startup script:
-- [`init.sh`](./resources/en/templates/init.sh) — runs dependency install, verification, and startup in one shot
+- `resources/en/templates/init.sh` — runs dependency install, verification, and startup in one shot
- Replace the `INSTALL_CMD`, `VERIFY_CMD`, and `START_CMD` with your actual commands
**Step 3.** Copy the progress log: