-
Notifications
You must be signed in to change notification settings - Fork 13
42 lines (39 loc) · 1.22 KB
/
algolia-update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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"
MBTA_API_BASE_URL: ${{ secrets.MBTA_API_BASE_URL }}
MBTA_API_KEY: ${{ secrets.MBTA_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