File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
.github/actions/rsync-deployments Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 7
7
required : false
8
8
default : " --archive --compress"
9
9
path :
10
- description : Local source directory (always copies its content only)
10
+ description : Local source directory
11
11
required : true
12
12
remote_path :
13
13
description : Remote destination directory
@@ -38,15 +38,14 @@ runs:
38
38
ssh-add - <<< "${{ inputs.remote_key }}"
39
39
40
40
# 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 }}"
42
42
43
43
# Resolve paths and DSN
44
- LOCAL_PATH="${GITHUB_WORKSPACE}/${{ inputs.path }}"
45
- DEST="${{ inputs.remote_path }}"
44
+ LOCAL_PATH="$GITHUB_WORKSPACE/${{ inputs.path }}"
46
45
DSN="${{ inputs.remote_user }}@${{ inputs.remote_host }}"
47
46
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 }} "
50
49
51
50
# Cleanup identities from the agent
52
51
ssh-add -D || true
You can’t perform that action at this time.
0 commit comments