Trigger Algolia Search Reindex #36
Workflow file for this run
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: 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 }}" |