File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -187,6 +187,14 @@ jobs:
187
187
# and then one locally on the runner to copy the list of files from the remote.
188
188
run : |
189
189
ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} -i ${{ steps.ssh.outputs.private-key-path }} /bin/bash <<'EOT'
190
+
191
+ # Create intermediate directories since we can't use `rsync`s `--mkpath` on some deployment targets
192
+ if [ -d "${{ inputs.source }}" ]; then
193
+ mkdir -p "${{ inputs.target }}"
194
+ else # we can assume we are transferring a file
195
+ mkdir -p $(dirname "${{ inputs.target }}")
196
+ fi
197
+
190
198
rsync --recursive --out-format="${{ inputs.target }}/%n" \
191
199
${{ ! inputs.overwrite-target && '--ignore-existing' || '--update' }} \
192
200
${{ inputs.source }} ${{ inputs.target }} \
You can’t perform that action at this time.
0 commit comments