Compare commits

...

4 Commits

Author SHA1 Message Date
github-actions
47f78aa96e chore(release): 3.3.3 [skip ci]
## [3.3.3](https://github.com/easingthemes/ssh-deploy/compare/v3.3.2...v3.3.3) (2023-01-02)

### Bug Fixes

* log buffer from rsync stdout ([8e19e0d](8e19e0d6bc))
2023-01-02 21:31:56 +00:00
Dragan Filipovic
8e19e0d6bc fix: log buffer from rsync stdout 2023-01-02 22:30:57 +01:00
Dragan Filipovic
da62405174 fix wrong args 2023-01-02 22:05:57 +01:00
Dragan Filipovic
2a85c96230 add more complex e2e tests 2023-01-02 22:02:16 +01:00
5 changed files with 22 additions and 11 deletions

View File

@@ -8,7 +8,7 @@ on:
ARGS:
description: 'ARGS'
required: true
default: '-rltgoDzvO'
default: '-rltgoDzvO --delete --chmod=ugo=rwX --progress'
EXCLUDE:
description: 'EXCLUDE'
required: true
@@ -16,7 +16,7 @@ on:
SSH_CMD_ARGS:
description: 'SSH_CMD_ARGS'
required: true
default: '-o StrictHostKeyChecking=no'
default: '-o StrictHostKeyChecking=no, -o UserKnownHostsFile=/dev/null'
env:
@@ -66,6 +66,9 @@ jobs:
mkdir test_project
cd test_project
touch index.html
touch image.svg
touch text.txt
truncate -s 500MB big_file.txt
date +"%Y-%m-%d %H:%M:%S,%3N" >> index.html
cat index.html
@@ -76,11 +79,11 @@ jobs:
# SSH_PRIVATE_KEY: $EXAMPLE_SSH_PRIVATE_KEY
# REMOTE_HOST: $EXAMPLE_REMOTE_HOST
REMOTE_USER: ${{ env.TEST_USER }}
ARGS: ${{ github.event.inputs.ARGS }}
SSH_CMD_ARGS: ${{ github.event.inputs.SSH_CMD_ARGS }}
ARGS: ${{ github.event.inputs.ARGS || '-rltgoDzvO --delete --chmod=ugo=rwX --progress' }}
SSH_CMD_ARGS: ${{ github.event.inputs.SSH_CMD_ARGS || '-o StrictHostKeyChecking=no, -o UserKnownHostsFile=/dev/null' }}
SOURCE: "test_project/"
TARGET: "/var/www/html/"
EXCLUDE: ${{ github.event.inputs.EXCLUDE }}
EXCLUDE: ${{ github.event.inputs.EXCLUDE || '/dist/, /node_modules/' }}
SCRIPT_BEFORE: |
whoami
ls -al

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +1,10 @@
## [3.3.3](https://github.com/easingthemes/ssh-deploy/compare/v3.3.2...v3.3.3) (2023-01-02)
### Bug Fixes
* log buffer from rsync stdout ([8e19e0d](https://github.com/easingthemes/ssh-deploy/commit/8e19e0d6bc9b1c332925ce0268ad64b50728fae5))
## [3.3.2](https://github.com/easingthemes/ssh-deploy/compare/v3.3.1...v3.3.2) (2023-01-02)

View File

@@ -1,6 +1,6 @@
{
"name": "@draganfilipovic/ssh-deploy",
"version": "3.3.2",
"version": "3.3.3",
"description": "Fast NodeJS action to deploy specific directory from `GITHUB_WORKSPACE` to a server via rsync over ssh.",
"main": "dist/index.js",
"files": [

View File

@@ -14,7 +14,7 @@ const nodeRsyncPromise = async (config) => new Promise((resolve, reject) => {
console.error('❌ [Rsync] cmd: ', cmd);
reject(new Error(`${error.message}\n\n${stderr}`));
} else {
console.log('[Rsync] cmd finished: ', cmd);
console.log('[Rsync] cmd finished: ', cmd);
resolve(stdout);
}
});
@@ -51,7 +51,9 @@ const rsyncCli = async ({
const defaultOptions = {
ssh: true,
recursive: true
recursive: true,
onStdout: (data) => console.log(data.toString()),
onStderr: (data) => console.error(data.toString())
};
// RSYNC COMMAND
@@ -59,8 +61,7 @@ const rsyncCli = async ({
return nodeRsyncPromise({
...defaultOptions,
src: source, dest: rsyncServer, excludeFirst: exclude, port: remotePort,
privateKey: privateKeyPath, args, sshCmdArgs,
onStdout: (data) => console.log(data), onStderr: (data) => console.error(data)
privateKey: privateKeyPath, args, sshCmdArgs
});
};