From 9f347c87cb17389978e5ee736f11510a55a8cefb Mon Sep 17 00:00:00 2001 From: Kevin Deng Date: Thu, 20 Aug 2026 19:47:53 +0900 Subject: [PATCH] Split dataset and font builds in deployment workflow (#29) --- .github/workflows/deploy.yml | 10 ++++++---- package.json | 4 +++- pnpm-workspace.yaml | 1 - 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2fe9037..9003949 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -30,6 +30,9 @@ jobs: key: sources-v1-${{ runner.os }}-${{ hashFiles('data/sources.lock.json') }} restore-keys: sources-v1-${{ runner.os }}- + - name: Build dataset + run: pnpm build:dataset + - name: Restore generated fonts id: fonts-cache uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 @@ -37,12 +40,11 @@ jobs: path: | public/fonts/*.woff2 public/fonts/fonts-*.css - key: fonts-v1-${{ runner.os }}-${{ hashFiles('data/sources.lock.json', 'package.json', 'pnpm-lock.yaml', 'scripts/build-data.ts', 'scripts/build-fonts.ts', 'scripts/cmap.ts', 'scripts/sources.ts', 'shared/links.ts', 'shared/row.ts', 'shared/types.ts', 'app/locales/*.ts', 'public/data/chars.json') }} - restore-keys: fonts-v1-${{ runner.os }}- + key: fonts-v1-${{ runner.os }}-${{ hashFiles('data/sources.lock.json', 'package.json', 'pnpm-lock.yaml', 'scripts/build-fonts.ts', 'scripts/sources.ts', 'shared/links.ts', 'shared/row.ts', 'shared/types.ts', 'app/locales/*.ts', 'public/data/chars.json') }} - - name: Build data + - name: Build fonts if: steps.fonts-cache.outputs.cache-hit != 'true' - run: pnpm build:data + run: pnpm build:fonts - name: Generate site run: pnpm generate diff --git a/package.json b/package.json index a81b938..fed6be0 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,9 @@ "lint": "eslint --cache", "format": "prettier --write .", "test": "vitest run", - "build:data": "node scripts/build-data.ts && node scripts/build-fonts.ts", + "build:dataset": "node scripts/build-data.ts", + "build:fonts": "node scripts/build-fonts.ts", + "build:data": "pnpm build:dataset && pnpm build:fonts", "update:sources": "node scripts/update-sources.ts", "postinstall": "nuxt prepare" }, diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 8a24f64..3052f73 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -27,5 +27,4 @@ catalog: allowBuilds: esbuild: true workerd: true -enableGlobalVirtualStore: true minimumReleaseAge: 0 -- 2.51.2