-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (49 loc) · 1.65 KB
/
index_on_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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Index on Algolia
on:
push:
branches: [develop, ci-*]
paths:
- config/**
- gecko/**
- .github/workflows/index_on_algolia.yml
jobs:
index-on-algolia:
name: Index on Algolia
runs-on: ubuntu-latest
environment: upload-search-records
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.9"
cache: "pip"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Clone and build website-v2-docs
run: |
git clone --depth=1 --branch=master https://github.com/boostorg/website-v2-docs.git ../website-v2-docs
cd ../website-v2-docs
./build.sh
- name: Download and extract boost release archive
run: |
wget --no-verbose -O boost.tar.gz $(sed -n "s/.*link: '\(.*\)'/\1/p" config/config.yaml)
tar -xzf boost.tar.gz -C ../
- name: Extract learn records
run: python -m gecko.extract_learn_records
- name: Extract libraries records
run: python -m gecko.extract_libraries_records
- name: Check validity of records
run: python -m gecko.sanitizer check
- name: Index on Algolia
env:
ALGOLIA_WRITE_API_KEY: ${{ secrets.ALGOLIA_WRITE_API_KEY }}
run: |
sed -i "s/ALGOLIA_WRITE_API_KEY/$ALGOLIA_WRITE_API_KEY/g" config/config.yaml
python -m gecko.index_on_algolia
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: algolia_records
path: ./algolia_records