-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (37 loc) · 1.1 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
41
42
43
44
45
name: Build Search Index
on:
push:
branches:
- main
jobs:
algolia:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- name: Get algolia as config
id: algolia_config
run: echo "::set-output name=config::$(cat algolia.json | jq -r tostring)"
- name: Push indices to Algolia
uses: signcl/docsearch-scraper-action@master
env:
APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}
API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
CONFIG: ${{ steps.algolia_config.outputs.config }}
index_apis:
needs: algolia
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip'
env:
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
- name: Install Requirements
run: pip install -r requirements.txt
- name: Update index
env:
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
working-directory: ./tools
run: python update_search.py