docs: add algolia crawler for LS docs #23
This file contains 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: Algolia Indexer for Label Studio Docs | |
on: | |
push: | |
branches: ["develop"] | |
paths: | |
- "docs/**" | |
- ".github/workflows/algolia-crawler-ls-docs.yml" | |
pull_request: | |
branches: | |
- develop | |
jobs: | |
algolia_indexer: | |
runs-on: ubuntu-latest | |
env: | |
APPLICATION_ID: "M7RXTHKYPM" | |
API_KEY: ${{ secrets.ALGOLIA_ADMIN_API_KEY }} | |
INDEX_NAME: "labelstudiodocs" | |
CONFIG: > | |
{ | |
"index_name": "labelstudiodocs", | |
"stop_urls": ["https://labelstud.io/guide/index.html", "https://labelstud.io/sdk/index.html"], | |
"selectors_exclude": [".home-page-index"], | |
"sitemap_urls": ["https://labelstud.io/sitemap-tutorials.xml", "https://deploy-preview-6570--heartex-docs.netlify.app/guide/sitemap-docs.xml"], | |
"selectors": { | |
"default": { | |
"lvl0": ".content h1, .ResourcesBannerHeading, .BlogTitle", | |
"lvl1": ".ResourcesContent h1, .ResourcesContent h2", | |
"lvl2": ".ResourcesContent h3", | |
"lvl3": ".ResourcesContent h4", | |
"lvl4": ".ResourcesContent h5", | |
"lvl5": ".ResourcesContent h6", | |
"content": ".ResourcesContent > .Text" | |
} | |
} | |
} | |
name: Index Algolia | |
steps: | |
- name: Algolia Docsearch Action | |
id: algolia | |
uses: adapttive/[email protected] |