Event 015: Cross-Domain Synthesis β Principles Proven Universal π #19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: π± Build Lambda Graph | |
| on: | |
| push: | |
| branches: [master, main] | |
| paths: | |
| - 'wiki/**' | |
| - 'seeds/**' | |
| - 'packages/wiki-parser/**' | |
| - 'scripts/build-graph.ts' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build-graph: | |
| name: Build graph.json from wiki + seeds | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: π₯ Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: π¦ Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| - name: π’ Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| - name: π Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: π¨ Build graph | |
| run: | | |
| pnpm build:graph | |
| echo "β Graph built successfully" | |
| # Verify graph.json exists | |
| if [ -f "data/graph.json" ]; then | |
| echo "π Graph size: $(wc -c < data/graph.json) bytes" | |
| echo "π Nodes: $(jq '.nodes | length' data/graph.json)" | |
| echo "π Edges: $(jq '.edges | length' data/graph.json)" | |
| else | |
| echo "β data/graph.json not found!" | |
| exit 1 | |
| fi | |
| - name: β Validate graph schema | |
| run: | | |
| echo "Validating graph.json against JSON Schema..." | |
| node scripts/validate-graph.mjs | |
| echo "β Schema validation passed" | |
| - name: πΎ Commit updated graph | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| if [ -n "$(git status --porcelain data/graph.json)" ]; then | |
| git add data/graph.json | |
| git commit -m "π± Auto-update graph.json from wiki/seeds changes | |
| Updated by GitHub Action after changes to: | |
| - wiki/ | |
| - seeds/ | |
| π€ Generated with GitHub Actions" | |
| git push | |
| echo "β Graph committed and pushed" | |
| else | |
| echo "βΉοΈ No changes to graph.json" | |
| fi | |
| - name: π€ Upload graph artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: lambda-graph | |
| path: data/graph.json | |
| retention-days: 90 | |
| - name: π Deploy to GitHub Pages (if enabled) | |
| if: github.ref == 'refs/heads/master' | |
| run: | | |
| # Copy graph to Pages directory if it exists | |
| if [ -d "docs" ]; then | |
| mkdir -p docs/data | |
| cp data/graph.json docs/data/ | |
| echo "β Graph copied to docs/data/ for Pages" | |
| fi |