From 7e583af82238ffd243f2c9cd5faaa27e3c5ee69e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asger=20Geel=20Weirs=C3=B8e?= Date: Thu, 11 Jun 2026 19:17:43 +0200 Subject: [PATCH] ci: force-install sharp linux-x64 binary, clear omit env, verify load Co-Authored-By: Claude Opus 4.8 (1M context) --- .gitea/workflows/deploy.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index ec7068e..d370c1e 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -16,11 +16,18 @@ jobs: with: node-version: 22 - # npm (not bun) + --include=optional so Sharp's platform binary - # (@img/sharp-linux-x64, an optional dep) installs on the runner, - # which otherwise omits optional deps -> astro:assets MissingSharp + # The runner forces omit of optional deps, dropping @img/sharp-linux-x64 + # (sharp's platform binary) -> astro:assets MissingSharp. Clear the omit + # env and force-install the linux/glibc/x64 sharp binary per sharp's + # official cross-platform install, then verify it loads. - name: Install dependencies - run: npm install --include=optional + env: + npm_config_omit: "" + npm_config_optional: "true" + run: | + npm install --include=optional + npm install --include=optional --os=linux --libc=glibc --cpu=x64 sharp + node -e "console.log('sharp', require('sharp').versions.sharp)" - name: Build site run: npm run build