File tree Expand file tree Collapse file tree 2 files changed +27
-3
lines changed
apps/meshjs-rag/app/api/v1 Expand file tree Collapse file tree 2 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 1+ name : Automate docs ingestion
2+
3+ on :
4+ pull_request :
5+ types : [closed]
6+ branches :
7+ - main
8+ paths :
9+ - " apps/docs/**"
10+
11+ jobs :
12+ trigger_ingest :
13+ if : github.event.pull_request.merged == true
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Call backend ingest docs endpoint
17+ run : |
18+ echo "Triggering docs ingestion"
19+ response=$(curl --fail --silent --show-error \
20+ -X POST "${{ secrets.BACKEND_BASE_URL }}/ingest" \
21+ -H "Authorization: Bearer ${{ secrets.INGEST_KEY }}" \
22+ -H "Accept: application/json")
23+
24+ echo "Ingestion response: $response"
Original file line number Diff line number Diff line change 1818# ENDPOINTS
1919###########################################################################################################
2020
21- @router .post ("/" )
21+ @router .post ("/docs " )
2222async def ingest_docs (credentials : HTTPAuthorizationCredentials = Depends (security ), supabase : AsyncClient = Depends (get_db_client )):
2323
2424 token = credentials .credentials
@@ -67,7 +67,7 @@ async def ingest_docs(credentials: HTTPAuthorizationCredentials = Depends(securi
6767
6868
6969@router .post ("/packages" )
70- async def ingest_packages (credentials : HTTPAuthorizationCredentials = Depends (security ), supabase : AsyncClient = Depends (get_db_client )):
70+ async def ingest_mesh_packages (credentials : HTTPAuthorizationCredentials = Depends (security ), supabase : AsyncClient = Depends (get_db_client )):
7171
7272 token = credentials .credentials
7373 if not token or token != os .getenv ("ADMIN_KEY" ):
@@ -110,7 +110,7 @@ async def ingest_packages(credentials: HTTPAuthorizationCredentials = Depends(se
110110
111111
112112@router .post ("/aiken-docs" )
113- async def ingest_packages (credentials : HTTPAuthorizationCredentials = Depends (security ), supabase : AsyncClient = Depends (get_db_client )):
113+ async def ingest_aiken_docs (credentials : HTTPAuthorizationCredentials = Depends (security ), supabase : AsyncClient = Depends (get_db_client )):
114114
115115 token = credentials .credentials
116116 if not token or token != os .getenv ("ADMIN_KEY" ):
You can’t perform that action at this time.
0 commit comments