Skip to content

frame-deploy-complete #30

frame-deploy-complete

frame-deploy-complete #30

Workflow file for this run

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: Build codex-index.json
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: '*.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
if ! git diff --cached --quiet; then
git commit -m "ci(codex): update search index [skip ci]"
git push
else
echo "No changes to commit."
fi