From 1bca30c1f555e271151f74bae261823d6145d08a Mon Sep 17 00:00:00 2001 From: Matteo Danelon Date: Wed, 15 Mar 2023 10:18:47 +0100 Subject: [PATCH] ci: drop collection before new scrape --- .github/workflows/update-search.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/update-search.yaml b/.github/workflows/update-search.yaml index c96436efa..35307fe65 100644 --- a/.github/workflows/update-search.yaml +++ b/.github/workflows/update-search.yaml @@ -21,5 +21,9 @@ jobs: TYPESENSE_PORT: 443 TYPESENSE_PROTOCOL: https run: | + COLLECTION=$(cat config-umh.docs.json | jq -r '.index_name') + curl -H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" \ + -X DELETE \ + "${TYPESENSE_PROTOCOL}://${TYPESENSE_HOST}/collections/${COLLECTION}" CONFIG=$(cat config-umh.docs.json | jq -r tostring) docker run -it -e "CONFIG=$CONFIG" --network host typesense/docsearch-scraper