From e4bf5faf5b07ace456ac72f909758d8cfa8e313e Mon Sep 17 00:00:00 2001 From: peptiderepo Date: Sun, 26 Apr 2026 05:22:12 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20ci=20=E2=80=94=20inline=20theme=20path?= =?UTF-8?q?=20in=20SSH=20verify=20step=20(was=20using=20undefined=20remote?= =?UTF-8?q?=20var)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'Verify deploy destination' step defined DEST on the runner then used ${DEST} inside an SSH command. The remote shell has no DEST variable, so ${DEST} expanded to empty → 'test -f /style.css' → always fails. Fix: inline the full theme path using ${{ secrets.SSH_USERNAME }} which the GitHub Actions runner expands to a literal string before the script is sent to SSH. Remote shell receives a plain path with no variables. --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 130113b..222ba91 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -90,10 +90,10 @@ jobs: ssh-keyscan -p ${{ secrets.SSH_PORT }} ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts 2>/dev/null || true - name: Verify deploy destination is a theme directory run: | - DEST="/home/${{ secrets.SSH_USERNAME }}/domains/peptiderepo.com/public_html/wp-content/themes/peptide-starter" + # Path verified inline below using ${{ }} runner expansion ssh -i ~/.ssh/deploy_key -p ${{ secrets.SSH_PORT }} -o StrictHostKeyChecking=accept-new \ ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} \ - "test -f \"\${DEST}/style.css\" || { echo \"ERROR: \${DEST}/style.css not found — aborting deploy to prevent rsync --delete wiping wrong directory\"; exit 1; }" + "test -f '/home/${{ secrets.SSH_USERNAME }}/domains/peptiderepo.com/public_html/wp-content/themes/peptide-starter/style.css' || { echo 'ERROR: style.css not found at theme path — aborting deploy'; exit 1; }" - name: Snapshot plugin inventory (pre-deploy) run: | ssh -i ~/.ssh/deploy_key -p ${{ secrets.SSH_PORT }} -o StrictHostKeyChecking=accept-new \