algolia-docsearch-action
algolia-docsearch-action copied to clipboard
Exception: Env CHROMEDRIVER_PATH='/usr/bin/chromedriver' is not a path to a file
Please see the action log: https://github.com/ant-design-blazor/ant-design-blazor/runs/6823621463?check_suite_focus=true
Installing dependencies from Pipfile.lock (aabb[41](https://github.com/ant-design-blazor/ant-design-blazor/runs/6823621463?check_suite_focus=true#step:4:42))...
Traceback (most recent call last):
File "docsearch", line 5, in <module>
run()
File "/github/workspace/docsearch-scraper/cli/src/index.py", line 161, in run
exit(command.run(sys.argv[2:]))
File "/github/workspace/docsearch-scraper/cli/src/commands/run_config.py", line 21, in run
return run_config(args[0])
File "/github/workspace/docsearch-scraper/cli/../scraper/src/index.py", line 33, in run_config
config = ConfigLoader(config)
File "/github/workspace/docsearch-scraper/cli/../scraper/src/config/config_loader.py", line 78, in __init__
self.user_agent)
File "/github/workspace/docsearch-scraper/cli/../scraper/src/config/browser_handler.py", line 34, in init
CHROMEDRIVER_PATH))
Exception: Env CHROMEDRIVER_PATH='/usr/bin/chromedriver' is not a path to a file
This happened to me because I had js_render
enabled in my algolia config.
It seems like this Github action doesn't support that option so I had to drop the action in my CI. The fix was to use the algolia/docsearch-scraper
docker image directly and define a job in CI like this:
steps:
- uses: actions/checkout@v2
- name: Run algolia/docsearch-scraper
run: |
docker pull algolia/docsearch-scraper
docker run \
-e ALGOLIA_APP_ID=${{ secrets.ALGOLIA_APP_ID }} \
-e API_KEY=${{ secrets.API_KEY }} \
-e "CONFIG=$(cat ./algolia-config.json | jq -r tostring)" \
algolia/docsearch-scraper