From 0da339c21482648b163464fbf87ac0eef2aaa1d1 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 29 Apr 2026 15:44:31 -0500 Subject: [PATCH] Anchor rsync excludes to transfer root --exclude=index.html matches index.html at every depth, which stripped prerendered index.html files from subdirectories. Anchoring with a leading slash limits the exclude to the transfer root so only the root index.html is skipped. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e026811b..a346ef4e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,7 +42,7 @@ deploy: - mkdir -p ~/.ssh && chmod 700 ~/.ssh - echo "$DEPLOY_SSH_KEY" | tr -d '\r' > ~/.ssh/id_ed25519 && chmod 600 ~/.ssh/id_ed25519 - ssh-keyscan -H "${DEPLOY_TARGET##*@}" >> ~/.ssh/known_hosts 2>/dev/null - - rsync -av --exclude=sw.js --exclude=index.html -e "ssh -i ~/.ssh/id_ed25519" dist/ "${DEPLOY_TARGET}:/" + - rsync -av --exclude=/sw.js --exclude=/index.html -e "ssh -i ~/.ssh/id_ed25519" dist/ "${DEPLOY_TARGET}:/" - rsync -av -e "ssh -i ~/.ssh/id_ed25519" dist/index.html "${DEPLOY_TARGET}:/" deploy-nsite: