-
-
Notifications
You must be signed in to change notification settings - Fork 272
40 lines (34 loc) · 1.04 KB
/
algolia.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
# Updates the Algolia search index on all content changes
name: Update Algolia index
on:
workflow_dispatch:
push:
branches:
- main
paths:
- .github/workflows/algolia.yml
- content/**.txt
- site/config/search.php
- site/models/**
- site/plugins/**
- scripts/algolia-index
jobs:
algolia:
name: Update Algolia index
runs-on: ubuntu-latest
steps:
- name: Cancel previous workflow runs
uses: styfle/cancel-workflow-action@01ce38bf961b4e243a6342cbade0dbc8ba3f0432 # pin@v0
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3
- name: Setup PHP environment
uses: shivammathur/setup-php@7fdd3ece872ec7ec4c098ae5ab7637d5e0a96067 # pin@v2
with:
php-version: "8.3"
extensions: mbstring, intl
coverage: none
ini-values: memory_limit=-1
- name: Update the Algolia index
run: scripts/algolia-index
env:
ALGOLIA_KEY: ${{ secrets.ALGOLIA_KEY }}