Skip to content

Commit 4ac5bae

Browse files
authored
Merge branch 'main' into docs-correct-sprint-word
2 parents 327190b + a06da21 commit 4ac5bae

File tree

425 files changed

+12784
-5440
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

425 files changed

+12784
-5440
lines changed

.github/workflows/dry-run-elasticsearch-indexing.yml

Lines changed: 52 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
merge_group:
99
pull_request:
1010
paths:
11-
- script/search/index-elasticsearch.js
11+
- 'script/search/**'
1212
- 'package*.json'
1313
- .github/workflows/dry-run-elasticsearch-indexing.yml
1414

@@ -46,9 +46,57 @@ jobs:
4646
node-version: 16.15.x
4747
cache: npm
4848

49-
- name: Install
49+
- name: Install dependencies
5050
run: npm ci
5151

52+
- name: Cache nextjs build
53+
uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09
54+
with:
55+
path: .next/cache
56+
key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}
57+
58+
- name: Run build scripts
59+
run: npm run build
60+
61+
- name: Start the server in the background
62+
env:
63+
ENABLE_DEV_LOGGING: false
64+
run: |
65+
npm run sync-search-server > /tmp/stdout.log 2> /tmp/stderr.log &
66+
67+
# first sleep to give it a chance to start
68+
sleep 6
69+
curl --retry-connrefused --retry 4 -I http://localhost:4002/
70+
71+
- if: ${{ failure() }}
72+
name: Debug server outputs on errors
73+
run: |
74+
echo "____STDOUT____"
75+
cat /tmp/stdout.log
76+
echo "____STDERR____"
77+
cat /tmp/stderr.log
78+
79+
- name: Scrape records into a temp directory
80+
env:
81+
# If a reusable, or anything in the `data/*` directory is deleted
82+
# you might get a
83+
#
84+
# RenderError: Can't find the key 'site.data.reusables...' in the scope
85+
#
86+
# But that'll get fixed in the next translation pipeline. For now,
87+
# let's just accept an empty string instead.
88+
THROW_ON_EMPTY: false
89+
90+
run: |
91+
mkdir /tmp/records
92+
npm run sync-search-indices -- \
93+
--language en \
94+
--version dotcom \
95+
--out-directory /tmp/records \
96+
--no-compression --no-lunr-index
97+
98+
ls -lh /tmp/records
99+
52100
# Serves two purposes;
53101
# 1. Be confident that the Elasticsearch server start-up worked at all
54102
# 2. Sometimes Elasticsearch will bind to the port but still not
@@ -62,8 +110,8 @@ jobs:
62110
ELASTICSEARCH_URL: 'http://localhost:9200'
63111
run: |
64112
./script/search/index-elasticsearch.js --verbose \
65-
-l en -l ja \
66-
-V dotcom -V ghes-3.5
113+
-l en \
114+
-V dotcom -- /tmp/records
67115
68116
- name: Show created indexes and aliases
69117
run: |

.github/workflows/sync-search-elasticsearch.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ jobs:
104104
- name: Index into Elasticsearch
105105
run: |
106106
./script/search/index-elasticsearch.js \
107-
--language ${{ matrix.language }} \
108-
--source-directory /tmp/records
107+
--language ${{ matrix.language }} -- /tmp/records
109108
110109
- name: Check created indexes and aliases
111110
run: |
57.5 KB
Loading
117 KB
Loading
53.2 KB
Loading
124 KB
Loading
106 KB
Loading
8.94 KB
Loading
11.9 KB
Loading
21 KB
Loading

0 commit comments

Comments
 (0)