Skip to content

feat(docs): reindex docs on change#863

Merged
Sg312 merged 4 commits intostagingfrom
feat/gh-doc-embeddings-action
Aug 4, 2025
Merged

feat(docs): reindex docs on change#863
Sg312 merged 4 commits intostagingfrom
feat/gh-doc-embeddings-action

Conversation

@Sg312
Copy link
Contributor

@Sg312 Sg312 commented Aug 4, 2025

Summary

Reindexes docs on change

Type of Change

  • Other: github action

Testing

Manual testing

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Aug 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 4, 2025 8:24pm
sim ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 4, 2025 8:24pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Summary

This PR adds a new GitHub Actions workflow (docs-embeddings.yml) that automatically reindexes documentation embeddings whenever documentation content changes. The workflow is designed to maintain fresh vector embeddings for the documentation search/retrieval system by triggering only when files in the apps/docs/** directory are modified on the main or staging branches.

The workflow integrates with the existing codebase by leveraging an existing TypeScript script (process-docs-embeddings.ts) with a --clear flag to regenerate embeddings from scratch. It follows the established pattern seen in other workflows like build.yml and ci.yml by using environment-specific database URLs - dynamically selecting between DATABASE_URL for main branch and STAGING_DATABASE_URL for staging branch deployments.

The automation fits into the broader CI/CD pipeline by ensuring that documentation changes are immediately reflected in the search functionality without manual intervention. This is particularly important for a documentation system that relies on vector embeddings for content discovery and retrieval.

Confidence score: 2/5

  • This PR has significant technical issues that could cause workflow failures and should not be merged without fixes
  • Score reflects critical syntax errors in shell scripting and redundant conditional logic that could lead to runtime failures
  • Pay close attention to the job condition syntax on line 43 and the redundant branch filtering logic on line 14

1 file reviewed, 1 comment

Edit Code Review Bot Settings | Greptile

Sg312 and others added 2 commits August 4, 2025 13:16
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@Sg312 Sg312 merged commit 4819b88 into staging Aug 4, 2025
5 checks passed
waleedlatif1 pushed a commit that referenced this pull request Aug 5, 2025
* Add github action to index docs

* Add new line

* Update .github/workflows/docs-embeddings.yml

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Updates

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@waleedlatif1 waleedlatif1 deleted the feat/gh-doc-embeddings-action branch August 6, 2025 02:01
waleedlatif1 pushed a commit that referenced this pull request Aug 6, 2025
* Add github action to index docs

* Add new line

* Update .github/workflows/docs-embeddings.yml

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Updates

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
* Add github action to index docs

* Add new line

* Update .github/workflows/docs-embeddings.yml

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Updates

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant