Sara/tec 215 clarify how scan sorting works on the projects page (#1825) #1523
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
name: Algolia scrape | |
on: | |
workflow_dispatch: | |
inputs: | |
parameter: | |
description: Run from dispatch | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
scrape: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Wait for 8 minutes | |
run: sleep 480s | |
shell: bash | |
- name: check out code 🛎 | |
uses: actions/checkout@v2 | |
# when scraping the site, inject secrets as environment variables | |
# then pass their values into the Docker container using "-e" syntax | |
# and inject config.json contents as another variable | |
# prefer this file (algolia-scrap.yml) over algolia-config.json for ranking | |
- name: scrape the site and send to Algolia 🧽 | |
env: | |
APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }} | |
API_KEY: ${{ secrets.ALGOLIA_API_KEY }} | |
run: | | |
docker run \ | |
-e APPLICATION_ID -e API_KEY \ | |
-e CONFIG="$(cat algolia-config.json)" \ | |
algolia/docsearch-scraper:latest | |
curl -X PUT \ | |
-H "X-Algolia-API-Key: ${API_KEY}" \ | |
-H "X-Algolia-Application-Id: ${APPLICATION_ID}" \ | |
--data-binary '{ | |
"ranking": ["desc(weight.page_rank)", "desc(weight.level)", "asc(weight.position)", "words", "exact", "attribute", "proximity", "typo"] | |
}' \ | |
"https://${APPLICATION_ID}.algolia.net/1/indexes/docs/settings?forwardToReplicas=true" |