name: split # One step of the module split, performed on the runner: rebuild from main's index.html with tools/split.js (the # line map), apply tools/split-post.py, check, commit to the branch the workflow was dispatched on. Throwaway once # the split has landed. on: workflow_dispatch: inputs: step: description: "comma list of modules to extract (the rest stays inline), or all" required: true message: description: "commit message (first line)" required: true permissions: contents: write jobs: split: runs-on: ubuntu-latest timeout-minutes: 10 steps: - uses: actions/checkout@v5 with: fetch-depth: 0 - uses: actions/setup-node@v4 with: node-version: 22 - name: rebuild from main's index.html env: STEP_IN: ${{ github.event.inputs.step }} run: | set -eu git show origin/main:index.html > index.html if [ "$STEP_IN" = all ]; then WRITE=1 node tools/split.js > /dev/null; else STEP="$STEP_IN" WRITE=1 node tools/split.js > /dev/null; fi python3 tools/split-post.py node --check $(ls *.js ui/*.js 2>/dev/null | grep -v -e brain.js -e sw.js) if [ -f covers.js ] && [ -f render.js ]; then node tools/check-pure.mjs; fi wc -l index.html *.js ui/*.js 2>/dev/null || true - name: commit env: MSG: ${{ github.event.inputs.message }} run: | set -eu git add -A if git diff --cached --quiet; then echo "nothing changed"; exit 0; fi git -c user.name='Claude Fable 5.1' -c user.email='noreply@anthropic.com' commit -q -m "$MSG" -m "Co-Authored-By: Claude Fable 5.1 " -m "Claude-Session: https://claude.ai/code/session_01Dhu3iHseRewQ2WpBSVLokG" git push -q origin "HEAD:${GITHUB_REF_NAME}"