From 5bc12850ca5de6bfbc2eba4818be4809020360be Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Mon, 11 May 2026 09:31:32 +0200 Subject: [PATCH] ci: exclude .bin from node_modules cache, npm rebuild on restore --- .github/workflows/deploy.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6a592b8..d623a93 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -20,7 +20,8 @@ jobs: CACHE_DIR=/usr/local/git/.cache/node_modules/${CACHE_KEY} if [ -d "$CACHE_DIR" ]; then echo "Restoring node_modules (${CACHE_KEY})" - rsync -a "$CACHE_DIR/" node_modules/ + rsync -a --exclude='.bin/' "$CACHE_DIR/" node_modules/ + npm rebuild --silent echo "hit=true" >> $GITHUB_OUTPUT else echo "hit=false" >> $GITHUB_OUTPUT @@ -35,7 +36,7 @@ jobs: if: steps.nm-cache.outputs.hit != 'true' run: | mkdir -p /usr/local/git/.cache/node_modules/${CACHE_KEY} - rsync -a --delete node_modules/ /usr/local/git/.cache/node_modules/${CACHE_KEY}/ + rsync -a --delete --exclude='.bin/' node_modules/ /usr/local/git/.cache/node_modules/${CACHE_KEY}/ - name: Build or restore sharp for FreeBSD run: |