We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 38385c6 commit 4f2fde6Copy full SHA for 4f2fde6
.github/workflows/upload-algolia.rb
@@ -20,3 +20,19 @@
20
21
# The API client automatically batches your records
22
index.replace_all_objects(records, {})
23
+
24
+# Apply settings from config file
25
+configFile = File.read('.github/workflows/algolia-config.json')
26
+config = JSON.parse(configFile)
27
28
+index.set_settings(config['settings'])
29
30
+# Apply synonyms if present
31
+if config['synonyms'] && !config['synonyms'].empty?
32
+ index.save_synonyms(config['synonyms'], { replaceExistingSynonyms: true })
33
+end
34
35
+# Apply rules if present
36
+if config['rules'] && !config['rules'].empty?
37
+ index.save_rules(config['rules'], { clearExistingRules: true })
38
0 commit comments