Skip to content

Algolia Crawler

Algolia Crawler #35

name: Algolia Crawler
on:
workflow_run:
workflows: ["Release to Production"]
types: [completed]
jobs:
docsearch:
runs-on:
group: Default
labels: docbot
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Run scraper
env:
APPLICATION_ID: ${{ secrets.ALGOLIA_APP_ID }}
API_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }}
run: docker run -e APPLICATION_ID=$APPLICATION_ID -e API_KEY=$API_KEY -e "CONFIG=$(cat ./docsearch.config.json | jq -r tostring)" algolia/docsearch-scraper
- name: Slack Notification
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_USERNAME: "spectromate"
SLACK_ICON_EMOJI: ":robot_panic:"
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: 'The Docs Algolia crawler job failed. Please check the GitHub Actions logs for more details.'