Skip to content

Commit c568507

Browse files
committed
fix: attempt to fix search github action
1 parent 1f6540e commit c568507

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.github/workflows/update-search.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ jobs:
77
update:
88
runs-on: ubuntu-latest
99
steps:
10+
- name: Check out repository code
11+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
1012
- name: Make sure we have node and dependencies
1113
run: npm i
1214
- name: Process and send index updates to Algolia
13-
run: npm run build-index
15+
env:
16+
ALGOLIA_KEY: ${{ secrets.ALGOLIA_KEY }}
17+
run: npm run generate-search-index

generate-search-index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function walk(dir) {
4747

4848
const fileContents = fs.readFileSync(filepath, "utf-8");
4949

50-
console.log("about to parse", filepath);
50+
// console.log("about to parse", filepath);
5151

5252
// Get rid of frontmatter
5353
let data, content;
@@ -114,7 +114,7 @@ function walk(dir) {
114114

115115
walk("src/pages");
116116

117-
console.dir(sitemap, { maxArrayLength: null });
117+
//console.dir(sitemap, { maxArrayLength: null });
118118

119119
try {
120120
index

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"build": "astro build",
1313
"preview": "astro preview",
1414
"astro": "astro",
15-
"build-index": "node ./generate-search-index.js"
15+
"generate-search-index": "node ./generate-search-index.js"
1616
},
1717
"dependencies": {
1818
"@astrojs/markdown-remark": "^3.2.0",

0 commit comments

Comments
 (0)