mirror of
https://github.com/dsh-market/dsh-market.git
synced 2026-09-28 05:03:07 +08:00
fix(ci): the site build could not write its catalog into a fresh checkout
data/ is generated and untracked, so a fresh checkout has no such directory:
curl died on its first write with exit code 23 — "Failed writing received
data" — before it ever touched the network. Every build-site run since
88c8ce3 (#545, "stop committing a copy of it") failed, which froze
dshmarket.com at the 2026-09-08 catalog: 3,363 plugin pages live, 4,347 in
the catalog today, so 1,082 plugins had no page at all.
mkdir -p data before the fetch, drop the now-dead data/ push trigger, and
give `npm run snapshot` — the same command by hand — the same guard.
This commit is contained in:
@@ -12,7 +12,6 @@ on:
|
||||
paths:
|
||||
- 'site/**'
|
||||
- 'scripts/build-site.mjs'
|
||||
- 'data/registry-snapshot.json'
|
||||
- '.github/workflows/build-site.yml'
|
||||
|
||||
# The build never writes to the repository: snapshots are fetched into the
|
||||
@@ -48,6 +47,11 @@ jobs:
|
||||
# a catalog stale is not a degraded answer but a wrong one.
|
||||
- name: Fetch catalog
|
||||
run: |
|
||||
# data/ is generated, so a fresh checkout does not contain it — git
|
||||
# does not track empty directories. Without this, curl dies on its
|
||||
# first write with exit code 23 before it ever reaches the network,
|
||||
# which is how every build from 2026-09-09 until 2026-09-25 failed.
|
||||
mkdir -p data
|
||||
curl -sfL --retry 3 --retry-delay 5 \
|
||||
https://awesome-dsh-plugin.com/plugins.json -o data/registry-snapshot.json
|
||||
# READMEs are a nice-to-have: without them pages still build, they
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
"prepack": "npm run build && node scripts/preflight.mjs",
|
||||
"prepare": "npm run build",
|
||||
"validate:registry": "node scripts/validate-registry.mjs",
|
||||
"snapshot": "curl -sf https://awesome-dsh-plugin.com/plugins.json -o data/registry-snapshot.json && curl -sf https://awesome-dsh-plugin.com/readmes.json -o data/readmes-snapshot.json",
|
||||
"snapshot": "mkdir -p data && curl -sf https://awesome-dsh-plugin.com/plugins.json -o data/registry-snapshot.json && curl -sf https://awesome-dsh-plugin.com/readmes.json -o data/readmes-snapshot.json",
|
||||
"check:web-auth-capture": "node scripts/check-web-auth-capture.mjs",
|
||||
"test:web": "node scripts/check-web-auth-capture.mjs && vitest run --config vitest.web.config.ts",
|
||||
"build:site": "node scripts/build-site.mjs"
|
||||
|
||||
Reference in New Issue
Block a user