Skip to content

Commit

Permalink
add algolia crawler
Browse files Browse the repository at this point in the history
  • Loading branch information
huguestennier committed Oct 29, 2024
1 parent e4c2721 commit ec095d6
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Algolia Indexer
name: Algolia Indexer for HumanSignal Docs

on:
push:
branches: [ 'develop' ]
branches: ["develop"]
paths:
- 'docs/**'
- '.github/workflows/algolia-crawler.yml'
- "docs/**"
- ".github/workflows/algolia-crawler-hs-docs.yml"

jobs:
algolia_indexer:
Expand All @@ -32,4 +32,4 @@ jobs:
steps:
- name: Algolia Docsearch Action
id: algolia
uses: adapttive/[email protected]
uses: adapttive/[email protected]
35 changes: 35 additions & 0 deletions .github/workflows/algolia-crawler-ls-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Algolia Indexer for Label Studio Docs

on:
push:
branches: ["develop"]
paths:
- "docs/**"
- ".github/workflows/algolia-crawler-ls-docs.yml"

jobs:
algolia_indexer:
runs-on: ubuntu-latest
env:
APPLICATION_ID: "HELLEDAKPT"
API_KEY: ${{ secrets.ALGOLIA_ADMIN_API_KEY }}
INDEX_NAME: "ghactionls"
CONFIG: >
{"index_name": "ghactionls",
"stop_urls": [],
"selectors_exclude": [".home-page-index"],
"start_urls": ["https://labelstud.io/guide", "https://labelstud.io/templates", "https://labelstud.io/tags", "https://labelstud.io/blog/categories/tutorials/"],
"selectors": {
"lvl0": ".content h1, .ResourcesBannerHeading, .BlogTitle",
"lvl1": ".content h2, .ResourcesContent h2",
"lvl2": ".content h3, .ResourcesContent h3",
"lvl3": ".content h4, .ResourcesContent h4",
"lvl4": ".content h5, .ResourcesContent h5",
"lvl5": ".content h6, .ResourcesContent h6",
"content": ".content-markdown > *"
}}
name: Index Algolia
steps:
- name: Algolia Docsearch Action
id: algolia
uses: adapttive/[email protected]
2 changes: 1 addition & 1 deletion docs/themes/v2/source/js/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

const appId = siteVersion == "enterprise" ? 'M7RXTHKYPM' : "HELLEDAKPT";
const apiKey = siteVersion == "enterprise" ? '8ed23cbc92e0806140603fb62236efee' : '1d0410ef855a968fbc40669df1c4a73e'
const indexName = siteVersion == "enterprise" ? 'ghaction' : 'labelstud'
const indexName = siteVersion == "enterprise" ? 'ghaction' : 'ghactionls'

if(searchInput) {

Expand Down

0 comments on commit ec095d6

Please sign in to comment.