fix: wait for pages, not netlify #95
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 Crawler | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
crawl: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Wait for pages deployment | |
if: github.event_name != 'workflow_dispatch' | |
uses: lewagon/[email protected] | |
with: | |
ref: ${{ github.ref }} | |
check-name: Deploy to GitHub Pages | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Trigger Algolia crawl | |
uses: algolia/algoliasearch-crawler-github-actions@v1 | |
with: | |
crawler-user-id: ${{ secrets.CRAWLER_USER_ID }} | |
crawler-api-key: ${{ secrets.CRAWLER_API_KEY }} | |
algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }} | |
algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }} | |
site-url: https://fixinventory.org | |
crawler-name: inventory-fix |