feat: enhance auto-indexing with TF-IDF NLP and comprehensive docs #7
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 Codex Search Index | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| build-index: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: npm install js-yaml gray-matter | |
| - name: Build search index with NLP | |
| run: | | |
| # Run the enhanced auto-indexer | |
| npm run index -- --validate | |
| # Check if validation passed | |
| if [ $? -ne 0 ]; then | |
| echo "⚠️ Validation warnings found, but continuing with build" | |
| fi | |
| - name: Upload index artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: codex-index | |
| path: | | |
| codex-index.json | |
| codex-report.json | |
| - name: Create index branch | |
| run: | | |
| git config --global user.name 'Frame Dev Bot' | |
| git config --global user.email 'team@frame.dev' | |
| # Create or checkout index branch | |
| git checkout -B index | |
| # Copy the index files | |
| cp codex-index.json index.json | |
| cp codex-report.json report.json | |
| # Commit and push | |
| git add index.json report.json | |
| git commit -m "chore: update search index and report [skip ci]" || echo "No changes to commit" | |
| git push origin index --force |