File tree Expand file tree Collapse file tree 1 file changed +13
-18
lines changed
Expand file tree Collapse file tree 1 file changed +13
-18
lines changed Original file line number Diff line number Diff line change 1- name : scrape
2- concurrency : scrape
1+ name : Algolia Crawler
2+
3+ concurrency : algolia-crawl
4+
35on :
46 push :
5- branches :
6- - main
7+ branches : [ main ]
78 workflow_dispatch :
9+
810jobs :
9- scrape :
11+ trigger_crawl :
12+ name : Trigger Algolia Crawl
1013 runs-on : ubuntu-latest
1114 steps :
12- - name : check out code 🛎d
13- uses : actions/checkout@v6
14- # when scraping the site, inject secrets as environment variables
15- # then pass their values into the Docker container using "-e" syntax
16- # and inject config.json contents as another variable
17- - name : scrape the site 🧽
18- env :
19- ALGOLIA_APP_ID : ${{ secrets.ALGOLIA_APP_ID }}
20- ALGOLIA_API_KEY : ${{ secrets.ALGOLIA_API_KEY }}
15+ - name : Trigger Algolia Crawler
2116 run : |
22- docker run \
23- -e ALGOLIA_APP_ID -e ALGOLIA_API_KEY \
24- -e CONFIG="$(cat config. json)" \
25- algolia/docsearch-scraper
17+ curl -X POST \
18+ 'https://crawler.algolia.com/api/1/crawlers/${{ secrets.CRAWLER_ID }}/reindex' \
19+ -H 'Content-Type: application/ json' \
20+ --user '${{ secrets.CRAWLER_USER_ID }}:${{ secrets.CRAWLER_API_KEY }}'
You can’t perform that action at this time.
0 commit comments