-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from resilient-tech/crawl-pr
feat: crawl docs immediately after PR is created or merged
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
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
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 |