Skip to content

Commit ecf9205

Browse files
committed
Workaround ssh-deploy GitHub Action bug not respecting "TARGET:" argument
1 parent bc3422c commit ecf9205

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/deploy-to-vps.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,17 @@ jobs:
1717
uses: easingthemes/ssh-deploy@main
1818
env:
1919
VPS_ENV_DIRECTORY: ${{ secrets.VPS_ENV_DIRECTORY }}
20+
VPS_TARGET: ${{ secrets.VPS_TARGET }}
2021
with:
2122
SSH_PRIVATE_KEY: ${{ secrets.VPS_SSH_PRIVATE_KEY }}
2223
ARGS: "-rlgoDzvc --delete"
2324
REMOTE_HOST: ${{ secrets.VPS_HOST }}
2425
REMOTE_USER: ${{ secrets.VPS_USER }}
2526
TARGET: ${{ secrets.VPS_TARGET }}
2627
SCRIPT_AFTER: |
28+
# Explicitly navigate to the target directory (workaround for SSH deploy bug(?))
29+
cd ${{ env.VPS_TARGET }}
30+
2731
# Get environment and config files
2832
cp -ar ${{ env.VPS_ENV_DIRECTORY }}/. .
2933

0 commit comments

Comments
 (0)