milanmk / actions-file-deployer

Composite GitHub Action (Linux runner) for deploying repository content to remote server. Fast and customizable deployment with proxy support. Deploy only changed files or do full sync/mirror of repository content.
The Unlicense
62 stars 14 forks source link

fix: prefix local path to `.deploy-running` #39

Closed Djontleman closed 1 month ago

Djontleman commented 2 months ago

Fixes https://github.com/milanmk/actions-file-deployer/issues/28

Problem

When using a local path that isn't ., the action fails because it cannot find the local .deploy-running file:

Transfer files
  Protocol: sftp
  Synchronization: full
  Local path: asset
  Remote path: /asset
  ____________________________________________________________________________________________________
  put: /home/runner/work/[repo]/[checked-out-repo]/.deploy-running: No such file or directory
  Error: Process completed with exit code 1.

Notice that the path did not contain asset.

Changes

Prefix with ${local_path_slash} when doing the put command.

When testing this out the action succeeded with the logs:

Transfer files
  Protocol: sftp
  Synchronization: full
  Local path: ./asset
  Remote path: /asset
  ____________________________________________________________________________________________________
  /home/runner/work/[repo]/[checked-out-repo]/asset/.deploy-running -> etc...
Djontleman commented 2 months ago

@milanmk