Feature/ssh cmd (#94)

* feat: Add SSH remote script support -  before and after rsync

* fix: remove __dirname

* feat: add sshCmdArgs option

* Add promise instead of callback

* fix: improve logs

* fix: Add simple command exists instead of a plugin

* add non interactive install

* feat: add onStderr and onStdout logs

* Improve reject messages

* feat: Add RSYNC_STDOUT env variable

* emoji updates

* fix: update workflow actions
This commit is contained in:
Dragan Filipović 2023-01-02 21:06:33 +01:00 committed by GitHub
parent a5d8edb941
commit ec9347f8c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 373 additions and 242 deletions

View file

@ -1,9 +1,9 @@
name: "ssh deploy"
description: "NodeJS action for FAST deployment with rsync/ssh"
description: "NodeJS action for FAST deployment with rsync/ssh and remote script execution before/after rsync"
author: "easingthemes"
inputs:
SSH_PRIVATE_KEY: # Private Key
description: "Private Key"
SSH_PRIVATE_KEY:
description: "Private key part of an SSH key pair"
required: true
REMOTE_HOST:
description: "Remote host"
@ -16,7 +16,7 @@ inputs:
required: false
default: "22"
SOURCE:
description: "Source directory"
description: "Source directory, path relative to `$GITHUB_WORKSPACE` root, eg: `dist/`"
required: false
default: ""
TARGET:
@ -27,8 +27,20 @@ inputs:
description: "Arguments to pass to rsync"
required: false
default: "-rltgoDzvO"
SSH_CMD_ARGS:
description: "An array of ssh arguments, they must be prefixed with -o and separated by a comma, for example: -o SomeArgument=no, -o SomeOtherArgument=5 "
required: false
default: "-o StrictHostKeyChecking=no"
EXCLUDE:
description: "An array of folder to exclude"
description: "paths to exclude separated by `,`, ie: `/dist/, /node_modules/`"
required: false
default: ""
SCRIPT_BEFORE:
description: "Script to run on host machine before rsync"
required: false
default: ""
SCRIPT_AFTER:
description: "Script to run on host machine after rsync"
required: false
default: ""
outputs: