Skip to content

Trigger Algolia Search Reindex #36

Trigger Algolia Search Reindex

Trigger Algolia Search Reindex #36

name: Trigger Algolia Search Reindex
on:
workflow_dispatch:
# trigger automatically when gh-pages is built
page_build:
jobs:
trigger:
runs-on: ubuntu-latest
steps:
- name: Wait for gh-page cache update
if: github.event_name == 'page_build' && github.event.build.status == 'built'
run: sleep 60
- name: Trigger search reindex
run: |
curl -X POST "https://crawler.algolia.com/api/1/crawlers/${{ secrets.ALGOLIA_CRAWLER_ID }}/reindex" \
--user "${{ secrets.ALGOLIA_USER_ID }}":"${{ secrets.ALGOLIA_TOKEN }}"