From dcae10b61d0ea15a6716694eeec76d8ba5c460da Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Fri, 24 Jan 2025 15:06:09 +0100 Subject: [PATCH 1/2] ci: improve search indexing --- .github/workflows/index.yml | 23 ----------------------- .github/workflows/production.yml | 8 ++++++++ 2 files changed, 8 insertions(+), 23 deletions(-) delete mode 100644 .github/workflows/index.yml diff --git a/.github/workflows/index.yml b/.github/workflows/index.yml deleted file mode 100644 index dab0a7b44d..0000000000 --- a/.github/workflows/index.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Search Index - -on: - push: - branches: - - main - -jobs: - indexing: - runs-on: ubuntu-latest - name: Indexing - steps: - - uses: actions/checkout@v4 - with: - repository: 'meilisearch/scrapix' - - name: Use Node.js - uses: actions/setup-node@v3 - with: - node-version: '20.x' - - run: yarn - - run: yarn start -c "$SCRAPIX_CONFIG" - env: - SCRAPIX_CONFIG: ${{ secrets.SCRAPIX_CONFIG }} diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index d11c74450c..68229e6671 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -78,3 +78,11 @@ jobs: echo ${{ secrets.GH_REGISTRY_TOKEN }} | docker login ghcr.io --username ${{ env.REGISTRY_USERNAME }} --password-stdin docker-compose -f ${{ env.STACK_FILE }} config env $(cat .env | xargs) docker stack deploy --prune --resolve-image always --with-registry-auth -c ${{ env.STACK_FILE }} ${{ env.REPOSITORY }} + + indexing: + needs: deploy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Run Scrapix + run: docker run --rm --env CRAWLER_CONFIG=${{ secrets.SCRAPIX_CONFIG }} getmeili/scrapix From fcf094fccc11f7139d818767d5e67797a0f0ddd1 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Fri, 24 Jan 2025 15:12:37 +0100 Subject: [PATCH 2/2] ci: hardcode scrapix version --- .github/workflows/production.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index 68229e6671..672751c88c 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -85,4 +85,4 @@ jobs: steps: - uses: actions/checkout@v4 - name: Run Scrapix - run: docker run --rm --env CRAWLER_CONFIG=${{ secrets.SCRAPIX_CONFIG }} getmeili/scrapix + run: docker run --rm --env CRAWLER_CONFIG=${{ secrets.SCRAPIX_CONFIG }} getmeili/scrapix:v0.1.8