diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a78bc64a59f..c2d84891742 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,6 +13,9 @@ jobs: contents: write pages: write steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Checkout code uses: actions/checkout@v4 @@ -59,3 +62,10 @@ jobs: AUTHOR_EMAIL: ${{ steps.vars.outputs.email }} COMMIT: ${{ steps.vars.outputs.sha_short }} GITHUB_REPO_LINK: "${{ github.server_url }}/${{ github.repository }}.git" + - name: Crawler + run: | + docker run \ + -e APPLICATION_ID=${{ secrets.ALGOLIA_APP_ID }} \ + -e API_KEY=${{ secrets.ALGOLIA_CRAWLER_API_KEY }} \ + -e "CONFIG=$(cat ./docsearch.json | jq -r tostring)" \ + algolia/docsearch-scraper diff --git a/docsearch.json b/docsearch.json new file mode 100644 index 00000000000..63462d33c92 --- /dev/null +++ b/docsearch.json @@ -0,0 +1,23 @@ +{ + "index_name": "harvester", + "sitemap_urls": ["http://docs.harvesterhci.io/sitemap.xml"], + "start_urls": ["http://docs.harvesterhci.io/"], + "selectors": { + "lvl0": "", + "lvl1": "article h1", + "lvl2": "article h2", + "lvl3": "article h3", + "lvl4": "article h4", + "lvl5": "article h5", + "lvl6": "article h6", + "text": "article p, article li, article td:last-child" + }, + "custom_settings": { + "attributesForFaceting": [ + "language", + "version", + "type", + "docusaurus_tag" + ] + } + } \ No newline at end of file