Skip to content

Commit

Permalink
use gh step output for passing config, update algolia config to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaiblaga89 committed Apr 10, 2024
1 parent c324834 commit fe9363b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/next.yml
Expand Up @@ -20,9 +20,10 @@ jobs:
with:
node-version: '18.x'
- name: test
id: scraper_config
run: |
export SCRAPER_CONFIG=$(cat ./config.next.json | jq -r tostring)
echo $SCRAPER_CONFIG
echo "scraper_config=${SCRAPER_CONFIG}" >> $GITHUB_OUTPUT
- name: Install Vercel CLI
run: npm install --global vercel@latest
- run: rm -rf .vercel
Expand All @@ -38,5 +39,5 @@ jobs:
uses: addnab/docker-run-action@v3
with:
image: algolia/docsearch-scraper
options: --env-file=algolia.env -e "CONFIG=$(cat ./config.next.json | jq -r tostring)"
options: --env-file=algolia.env -e "CONFIG=${{ steps.scraper_config.outputs.scraper_config }}"
run: pipenv run python -m src.index
11 changes: 11 additions & 0 deletions config.next.json
Expand Up @@ -15,5 +15,16 @@
"lvl4": "article h5, article td:first-child",
"lvl5": "article h6",
"content": "article p, article li, article td:last-child"
},
"strip_chars": " .,;:#",
"custom_settings": {
"attributesToRetrieve": [
"hierarchy",
"content",
"anchor",
"url",
"url_without_anchor",
"type"
]
}
}

0 comments on commit fe9363b

Please sign in to comment.