From f4c2739ac729c7550d84c71150c1c496ca7579bc Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Mon, 11 May 2026 09:26:52 +0200 Subject: [PATCH] ci: swap cp -r to rsync -a for node_modules cache --- .github/workflows/deploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c057647..6a592b8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -20,7 +20,7 @@ jobs: CACHE_DIR=/usr/local/git/.cache/node_modules/${CACHE_KEY} if [ -d "$CACHE_DIR" ]; then echo "Restoring node_modules (${CACHE_KEY})" - cp -r "$CACHE_DIR" node_modules + rsync -a "$CACHE_DIR/" node_modules/ echo "hit=true" >> $GITHUB_OUTPUT else echo "hit=false" >> $GITHUB_OUTPUT @@ -34,8 +34,8 @@ jobs: - name: Save node_modules cache if: steps.nm-cache.outputs.hit != 'true' run: | - mkdir -p /usr/local/git/.cache/node_modules - cp -r node_modules /usr/local/git/.cache/node_modules/${CACHE_KEY} + mkdir -p /usr/local/git/.cache/node_modules/${CACHE_KEY} + rsync -a --delete node_modules/ /usr/local/git/.cache/node_modules/${CACHE_KEY}/ - name: Build or restore sharp for FreeBSD run: |