Skip to content

Commit bb29be4

Browse files
committed
build changes
1 parent 10c2ebc commit bb29be4

File tree

4 files changed

+52
-5
lines changed

4 files changed

+52
-5
lines changed

.github/workflows/build-search.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Update Algolia Search
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
- opened
8+
- synchronize
9+
- reopened
10+
env:
11+
# Force the stdout and stderr streams to be unbuffered
12+
PYTHONUNBUFFERED: 1
13+
14+
jobs:
15+
update-search:
16+
#if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'update search')
17+
if: contains(github.event.pull_request.labels.*.name, 'update search') # Updated to trigger directly on PRs with the label
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout Repository
22+
uses: actions/checkout@v3
23+
24+
- name: Set up Node.js
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version: '20'
28+
29+
- name: Run Prep from Master
30+
run: yarn prep-from-master
31+
32+
- name: Run Auto Generate Settings
33+
run: yarn auto-generate-settings
34+
35+
- name: Run Indexer
36+
run: yarn run-indexer
37+
env:
38+
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY_DEV }}
39+
ALGOLIA_APP_ID: 7AL1W7YVZK
40+
41+
- name: Verify Completion
42+
run: echo "All steps completed successfully!"

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616
"serve": "docusaurus serve",
1717
"build-api-doc": "node clickhouseapi.js",
1818
"build-swagger": "npx @redocly/cli build-docs https://api.clickhouse.cloud/v1 --output build/en/cloud/manage/api/swagger.html",
19-
"new-build": "bash ./copyClickhouseRepoDocs.sh && bash ./scripts/settings/autogenerate-settings.sh && yarn build-api-doc && yarn build && yarn build-swagger",
19+
"auto-generate-settings": "bash ./scripts/settings/autogenerate-settings.sh",
20+
"new-build": "bash ./copyClickhouseRepoDocs.sh && yarn auto-generate-settings && yarn build-api-doc && yarn build && yarn build-swagger",
2021
"start": "docusaurus start",
2122
"swizzle": "docusaurus swizzle",
22-
"write-heading-ids": "docusaurus write-heading-ids"
23+
"write-heading-ids": "docusaurus write-heading-ids",
24+
"run-indexer": "bash ./scripts/search/run_indexer.sh"
2325
},
2426
"dependencies": {
2527
"@docusaurus/core": "3.7.0",

scripts/search/compute_ndcg.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@
55

66
ALGOLIA_INDEX_NAME = "clickhouse"
77

8+
# dev details
9+
ALGOLIA_APP_ID = "7AL1W7YVZK"
10+
ALGOLIA_API_KEY = "43bd50d4617a97c9b60042a2e8a348f9"
811

9-
# Initialize Algolia client
10-
ALGOLIA_APP_ID = "5H9UG7CX5W"
11-
ALGOLIA_API_KEY = "4a7bf25cf3edbef29d78d5e1eecfdca5"
12+
# Prod details
13+
# ALGOLIA_APP_ID = "5H9UG7CX5W"
14+
# ALGOLIA_API_KEY = "4a7bf25cf3edbef29d78d5e1eecfdca5"
1215

1316
# old search engine using crawler
1417
# ALGOLIA_APP_ID = "62VCH2MD74"
File renamed without changes.

0 commit comments

Comments
 (0)