frame-deploy-complete #1058
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 and Publish Codex Index | |
| on: | |
| push: | |
| paths: | |
| - 'weaves/**' | |
| - 'scripts/**' | |
| - 'schema/**' | |
| - '.github/workflows/auto-index.yml' | |
| workflow_dispatch: | |
| repository_dispatch: | |
| types: | |
| - frame-deploy-complete | |
| jobs: | |
| build-index: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Process blocks and calculate worthiness | |
| run: node scripts/block-processor.js --all | |
| continue-on-error: true | |
| - name: Generate block tag suggestions | |
| run: node lib/block-tagging.js --all | |
| continue-on-error: true | |
| - name: Build codex-index.json (includes block data) | |
| run: pnpm run index | |
| - name: Build codex-search.json | |
| run: pnpm run build:search | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: codex-search-assets | |
| path: | | |
| codex-index.json | |
| codex-search.json | |
| codex-report.json | |
| codex-blocks.json | |
| publish-artifacts: | |
| needs: build-index | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: codex-search-assets | |
| path: . | |
| - name: Commit and push JSON assets | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add codex-index.json codex-search.json codex-report.json codex-blocks.json | |
| if ! git diff --cached --quiet; then | |
| git commit -m "ci(codex): update search index and block tags [skip ci]" | |
| git push | |
| else | |
| echo "No changes to commit." | |
| fi |