Skip to content

Commit d5bf4e6

Browse files
committed
Fix rsync deploy
1 parent f9d252d commit d5bf4e6

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.github/actions/rsync-deployments/action.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ inputs:
77
required: false
88
default: "--archive --compress"
99
path:
10-
description: Local source directory (always copies its content only)
10+
description: Local source directory
1111
required: true
1212
remote_path:
1313
description: Remote destination directory
@@ -38,15 +38,14 @@ runs:
3838
ssh-add - <<< "${{ inputs.remote_key }}"
3939
4040
# SSH command with host key checking disabled (matches your reference impl)
41-
RSH="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p ${{ inputs.remote_port }}"
41+
RSH="ssh -o StrictHostKeyChecking=no -p ${{ inputs.remote_port }}"
4242
4343
# Resolve paths and DSN
44-
LOCAL_PATH="${GITHUB_WORKSPACE}/${{ inputs.path }}"
45-
DEST="${{ inputs.remote_path }}"
44+
LOCAL_PATH="$GITHUB_WORKSPACE/${{ inputs.path }}"
4645
DSN="${{ inputs.remote_user }}@${{ inputs.remote_host }}"
4746
48-
# Deploy (copy *contents* of LOCAL_PATH into DEST)
49-
rsync ${{ inputs.switches }} -e "$RSH" "${LOCAL_PATH%/}/" "$DSN:'${DEST%/}/'"
47+
# Deploy
48+
sh -c "rsync ${{ inputs.switches }} -e '$RSH' $LOCAL_PATH $DSN:${{ inputs.remote_path }}"
5049
5150
# Cleanup identities from the agent
5251
ssh-add -D || true

0 commit comments

Comments
 (0)