@@ -129,20 +129,26 @@ jobs:
129
129
repository : mdn/mdn-contributor-spotlight
130
130
path : mdn/mdn-contributor-spotlight
131
131
132
+ - uses : actions/checkout@v4
133
+ if : ${{ ! vars.SKIP_BUILD }}
134
+ with :
135
+ repository : LeoMcA/fer
136
+ path : mdn/fred
137
+
132
138
- name : Setup Node.js environment
133
139
if : ${{ ! vars.SKIP_BUILD || ! vars.SKIP_FUNCTION }}
134
140
uses : actions/setup-node@v4
135
141
with :
136
142
node-version-file : " .nvmrc"
137
- cache : ${{ github.event.inputs.rari-ref == '' && 'yarn' || '' }}
143
+ # cache: ${{ github.event.inputs.rari-ref == '' && 'yarn' || '' }}
138
144
139
- - name : Install all yarn packages
140
- if : ${{ ! vars.SKIP_BUILD }}
141
- run : yarn --frozen-lockfile
142
- env :
143
- # Use a GITHUB_TOKEN to bypass rate limiting for ripgrep and rari.
144
- # See https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
145
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
145
+ # - name: Install all yarn packages
146
+ # if: ${{ ! vars.SKIP_BUILD }}
147
+ # run: yarn --frozen-lockfile
148
+ # env:
149
+ # # Use a GITHUB_TOKEN to bypass rate limiting for ripgrep and rari.
150
+ # # See https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
151
+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
146
152
147
153
- uses : actions/checkout@v4
148
154
if : ${{ !( vars.SKIP_BUILD || github.event.inputs.rari-ref == '' ) }}
@@ -179,6 +185,7 @@ jobs:
179
185
run : cat /proc/cpuinfo
180
186
181
187
- name : Build everything
188
+ working-directory : mdn/fred
182
189
if : ${{ ! vars.SKIP_BUILD }}
183
190
env :
184
191
# Remember, the mdn/content repo got cloned into `pwd` into a
@@ -192,7 +199,7 @@ jobs:
192
199
BASE_URL : " https://test.developer.allizom.org"
193
200
194
201
# rari
195
- BUILD_OUT_ROOT : " client/build "
202
+ BUILD_OUT_ROOT : " out "
196
203
LIVE_SAMPLES_BASE_URL : https://live.test.mdnyalp.dev
197
204
INTERACTIVE_EXAMPLES_BASE_URL : https://interactive-examples.mdn.allizom.net
198
205
ADDITIONAL_LOCALES_FOR_GENERICS_AND_SPAS : de
@@ -252,28 +259,33 @@ jobs:
252
259
echo "CONTENT_ROOT=$CONTENT_ROOT"
253
260
echo "CONTENT_TRANSLATED_ROOT=$CONTENT_TRANSLATED_ROOT"
254
261
echo "BLOG_ROOT=$BLOG_ROOT"
255
- # Build the ServiceWorker first
256
- yarn build:sw
257
- yarn build:client
258
- yarn build:ssr
262
+ # # Build the ServiceWorker first
263
+ # yarn build:sw
264
+ # yarn build:client
265
+ # yarn build:ssr
259
266
260
- cp assets/nonprod/robots.txt client/build/robots.txt
267
+ npm ci
268
+ mkdir -p out/static
261
269
262
- yarn rari content sync-translated-content
263
- yarn rari git-history
270
+ npm run rari content sync-translated-content
271
+ npm run rari git-history
264
272
265
- yarn rari build --all --issues client/build/issues.json --templ-stats
273
+ npm run rari build --all --issues client/build/issues.json --templ-stats
266
274
267
275
# SSR all pages
268
- yarn render:html
276
+ npm run build
277
+ node build/ssr.js
278
+ cp -r dist/* out/static/
279
+
280
+ cp ../../assets/nonprod/robots.txt out/robots.txt
269
281
270
- # Generate whatsdeployed files.
271
- yarn tool:legacy whatsdeployed --output client/build/_whatsdeployed/code.json
272
- yarn tool:legacy whatsdeployed $CONTENT_ROOT --output client/build/_whatsdeployed/content.json
273
- yarn tool:legacy whatsdeployed $CONTENT_TRANSLATED_ROOT --output client/build/_whatsdeployed/translated-content.json
282
+ # # Generate whatsdeployed files.
283
+ # yarn tool:legacy whatsdeployed --output client/build/_whatsdeployed/code.json
284
+ # yarn tool:legacy whatsdeployed $CONTENT_ROOT --output client/build/_whatsdeployed/content.json
285
+ # yarn tool:legacy whatsdeployed $CONTENT_TRANSLATED_ROOT --output client/build/_whatsdeployed/translated-content.json
274
286
275
- # Sort DE search index by en-US popularity.
276
- node scripts/reorder-search-index.mjs client/build/en-us/search-index.json client/build/de/search-index.json
287
+ # # Sort DE search index by en-US popularity.
288
+ # node scripts/reorder-search-index.mjs client/build/en-us/search-index.json client/build/de/search-index.json
277
289
278
290
- name : Authenticate with GCP
279
291
uses : google-github-actions/auth@v2
@@ -288,8 +300,7 @@ jobs:
288
300
- name : Sync build
289
301
if : ${{ ! vars.SKIP_BUILD }}
290
302
run : |-
291
- gsutil -q -m -h "Cache-Control: public, max-age=3600" cp -r client/build/static gs://${{ vars.GCP_BUCKET_NAME }}/main/
292
- gsutil -q -m -h "Cache-Control: public, max-age=3600" rsync -cdrj html,json,txt -y "^static/" client/build gs://${{ vars.GCP_BUCKET_NAME }}/main
303
+ gsutil -q -m -h "Cache-Control: public, max-age=3600" cp -r mdn/fred/out gs://${{ vars.GCP_BUCKET_NAME }}/fred
293
304
294
305
- name : Authenticate with GCP
295
306
if : ${{ ! vars.SKIP_FUNCTION }}
@@ -339,7 +350,7 @@ jobs:
339
350
--set-env-vars="ORIGIN_MAIN=test.developer.allizom.org" \
340
351
--set-env-vars="ORIGIN_LIVE_SAMPLES=live.test.mdnyalp.dev" \
341
352
--set-env-vars="ORIGIN_PLAY=test.mdnyalp.dev" \
342
- --set-env-vars="SOURCE_CONTENT=https://storage.googleapis.com/${{ vars.GCP_BUCKET_NAME }}/main /" \
353
+ --set-env-vars="SOURCE_CONTENT=https://storage.googleapis.com/${{ vars.GCP_BUCKET_NAME }}/fred /" \
343
354
--set-env-vars="SOURCE_API=https://api.developer.allizom.org/" \
344
355
--set-env-vars="BSA_ENABLED=true" \
345
356
--set-env-vars="SENTRY_DSN=${{ secrets.SENTRY_DSN_CLOUD_FUNCTION }}" \
0 commit comments