Skip to content

Commit

Permalink
Merge pull request #33 from resilient-tech/crawl-pr
Browse files Browse the repository at this point in the history
feat: crawl docs immediately after PR is created or merged
  • Loading branch information
vorasmit authored Mar 20, 2024
2 parents 316a61c + 996f947 commit 5da0f9c
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/algolia_crawler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Algolia Crawler
on:
push:
branches: [ main ]

jobs:
algolia_recrawl:
name: Algolia Recrawl
runs-on: ubuntu-latest
steps:
# checkout this repo
- name: Checkout Repo
uses: actions/checkout@v4

# We don't know when the site will be deployed, we just wait a few seconds
# Better solutions can be found
- name: Sleep for 120s
run: sleep 120

# For main branch
- name: MAIN => Algolia crawler creation and recrawl (Push on Main branch)
if: github.ref == 'refs/heads/main'
uses: algolia/algoliasearch-crawler-github-actions@v1
id: crawler_push
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 }}
crawler-name: 'docs-india-compliance-app'
site-url: 'https://docs.indiacompliance.app/'
override-config: true

0 comments on commit 5da0f9c

Please sign in to comment.