Skip to content

Update Algolia index #335

Update Algolia index

Update Algolia index #335

Workflow file for this run

name: Update Algolia index
on:
workflow_call:
workflow_dispatch:
schedule:
- cron: "0 0 1 * *" # At 00:00 on day-of-month 1.
env:
MIX_ENV: dev
USE_SERVER_SENT_EVENTS: "false"
V3_URL: ${{ secrets.V3_URL }}
V3_API_KEY: ${{ secrets.V3_API_KEY }}
WARM_CACHES: "false"
jobs:
algolia:
runs-on: ubuntu-latest
if: github.repository_owner == 'mbta'
steps:
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
with:
path: ~/.asdf
key: ci-asdf-cache-${{ hashFiles('.tool-versions') }}
restore-keys: ci-asdf-cache-
- uses: mbta/actions/reshim-asdf@v2
- uses: actions/cache/restore@v4
with:
path: deps
key: ci-mix-cache-${{ hashFiles('mix.lock') }}
restore-keys: ci-mix-cache-
# the running application runs Webpack to render React stuff :(, so need NPM too
- uses: actions/cache/restore@v4
with:
path: assets/node_modules
key: ci-nodejs-cache-${{ hashFiles('assets/package-lock.json') }}
restore-keys: ci-nodejs-cache-
- env:
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_WRITE_KEY: ${{ secrets.ALGOLIA_WRITE_KEY }}
run: mix algolia.update