ssh-deploy icon indicating copy to clipboard operation
ssh-deploy copied to clipboard

Feature request: option to run mkdir -p before sync

Open reinder opened this issue 4 years ago • 0 comments

I use ssh-deploy for a while now, it is great! However I've one issue. If the remote directory path not fully exists it fails. In my case the branch name is part of the remote path. Whenever a new branch is create the deployment fails because the branch dir doesn't exist remotely. This can be solved by manually creating the directory, however it would be great if ssh-deply can handle it by running mkdir -p <path> over ssh before the sync :)

Console log when the branch dir interface-controller doesn't exists:

[Rsync] Starting Rsync Action: /home/runner/work/traintastic/traintastic/dist/* to ***@***:***/traintastic/interface-controller/211/
[Rsync] exluding folders 
⚠️ [Rsync] error:  rsync exited with code 11
⚠️ [Rsync] stderr:  Warning: Permanently added '[***]:***,[51.195.100.163]:***' (ECDSA) to the list of known hosts.
rsync: mkdir "***/traintastic/interface-controller/211" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at main.c(682) [Receiver=3.1.3]

reinder avatar Oct 03 '21 16:10 reinder