mirror of
https://github.com/walkinglabs/learn-harness-engineering.git
synced 2026-09-19 05:06:27 +08:00
67dfa5937e
- Add 1-2 mermaid diagrams per lecture (EN + ZH, 24 files total) illustrating core concepts: five-layer failure model, harness subsystems, knowledge visibility, instruction architecture, session continuity, initialization lifecycle, WIP=1 workflow, feature state machine, termination checks, test pyramid, observability layers, and clean state dimensions - Add PDF build pipeline: scripts/build-course-pdfs.ts and npm scripts - Add README screenshot capture script and workflow - Add GitHub Actions workflow for automated PDF releases - Update README/README-CN with screenshots and PDF documentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
72 lines
1.7 KiB
YAML
72 lines
1.7 KiB
YAML
name: Build course PDFs and publish release assets
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: Release tag to create or update
|
|
required: true
|
|
type: string
|
|
release_name:
|
|
description: Release title
|
|
required: true
|
|
type: string
|
|
prerelease:
|
|
description: Mark release as prerelease
|
|
required: false
|
|
default: false
|
|
type: boolean
|
|
release:
|
|
types:
|
|
- published
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build-pdfs:
|
|
runs-on: ubuntu-latest
|
|
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: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Install Chromium for Playwright
|
|
run: npx playwright install --with-deps chromium
|
|
|
|
- name: Build course PDFs
|
|
run: npm run pdf:build
|
|
|
|
- name: Upload PDF artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: course-pdfs
|
|
path: artifacts/pdfs
|
|
|
|
- name: Publish PDFs to existing release
|
|
if: github.event_name == 'release'
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
tag_name: ${{ github.event.release.tag_name }}
|
|
files: artifacts/pdfs/*.pdf
|
|
|
|
- name: Create or update release with PDFs
|
|
if: github.event_name == 'workflow_dispatch'
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
tag_name: ${{ inputs.tag }}
|
|
name: ${{ inputs.release_name }}
|
|
prerelease: ${{ inputs.prerelease }}
|
|
generate_release_notes: true
|
|
files: artifacts/pdfs/*.pdf
|