mirror of
https://github.com/easingthemes/ssh-deploy.git
synced 2024-11-19 08:08:05 +08:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
47f78aa96e | ||
|
8e19e0d6bc | ||
|
da62405174 | ||
|
2a85c96230 |
13
.github/workflows/e2e.yml
vendored
13
.github/workflows/e2e.yml
vendored
@@ -8,7 +8,7 @@ on:
|
|||||||
ARGS:
|
ARGS:
|
||||||
description: 'ARGS'
|
description: 'ARGS'
|
||||||
required: true
|
required: true
|
||||||
default: '-rltgoDzvO'
|
default: '-rltgoDzvO --delete --chmod=ugo=rwX --progress'
|
||||||
EXCLUDE:
|
EXCLUDE:
|
||||||
description: 'EXCLUDE'
|
description: 'EXCLUDE'
|
||||||
required: true
|
required: true
|
||||||
@@ -16,7 +16,7 @@ on:
|
|||||||
SSH_CMD_ARGS:
|
SSH_CMD_ARGS:
|
||||||
description: 'SSH_CMD_ARGS'
|
description: 'SSH_CMD_ARGS'
|
||||||
required: true
|
required: true
|
||||||
default: '-o StrictHostKeyChecking=no'
|
default: '-o StrictHostKeyChecking=no, -o UserKnownHostsFile=/dev/null'
|
||||||
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
@@ -66,6 +66,9 @@ jobs:
|
|||||||
mkdir test_project
|
mkdir test_project
|
||||||
cd test_project
|
cd test_project
|
||||||
touch index.html
|
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
|
date +"%Y-%m-%d %H:%M:%S,%3N" >> index.html
|
||||||
cat index.html
|
cat index.html
|
||||||
|
|
||||||
@@ -76,11 +79,11 @@ jobs:
|
|||||||
# SSH_PRIVATE_KEY: $EXAMPLE_SSH_PRIVATE_KEY
|
# SSH_PRIVATE_KEY: $EXAMPLE_SSH_PRIVATE_KEY
|
||||||
# REMOTE_HOST: $EXAMPLE_REMOTE_HOST
|
# REMOTE_HOST: $EXAMPLE_REMOTE_HOST
|
||||||
REMOTE_USER: ${{ env.TEST_USER }}
|
REMOTE_USER: ${{ env.TEST_USER }}
|
||||||
ARGS: ${{ github.event.inputs.ARGS }}
|
ARGS: ${{ github.event.inputs.ARGS || '-rltgoDzvO --delete --chmod=ugo=rwX --progress' }}
|
||||||
SSH_CMD_ARGS: ${{ github.event.inputs.SSH_CMD_ARGS }}
|
SSH_CMD_ARGS: ${{ github.event.inputs.SSH_CMD_ARGS || '-o StrictHostKeyChecking=no, -o UserKnownHostsFile=/dev/null' }}
|
||||||
SOURCE: "test_project/"
|
SOURCE: "test_project/"
|
||||||
TARGET: "/var/www/html/"
|
TARGET: "/var/www/html/"
|
||||||
EXCLUDE: ${{ github.event.inputs.EXCLUDE }}
|
EXCLUDE: ${{ github.event.inputs.EXCLUDE || '/dist/, /node_modules/' }}
|
||||||
SCRIPT_BEFORE: |
|
SCRIPT_BEFORE: |
|
||||||
whoami
|
whoami
|
||||||
ls -al
|
ls -al
|
||||||
|
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -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)
|
## [3.3.2](https://github.com/easingthemes/ssh-deploy/compare/v3.3.1...v3.3.2) (2023-01-02)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@draganfilipovic/ssh-deploy",
|
"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.",
|
"description": "Fast NodeJS action to deploy specific directory from `GITHUB_WORKSPACE` to a server via rsync over ssh.",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"files": [
|
"files": [
|
||||||
|
@@ -14,7 +14,7 @@ const nodeRsyncPromise = async (config) => new Promise((resolve, reject) => {
|
|||||||
console.error('❌ [Rsync] cmd: ', cmd);
|
console.error('❌ [Rsync] cmd: ', cmd);
|
||||||
reject(new Error(`${error.message}\n\n${stderr}`));
|
reject(new Error(`${error.message}\n\n${stderr}`));
|
||||||
} else {
|
} else {
|
||||||
console.log('[Rsync] cmd finished: ', cmd);
|
console.log('⭐ [Rsync] cmd finished: ', cmd);
|
||||||
resolve(stdout);
|
resolve(stdout);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -51,7 +51,9 @@ const rsyncCli = async ({
|
|||||||
|
|
||||||
const defaultOptions = {
|
const defaultOptions = {
|
||||||
ssh: true,
|
ssh: true,
|
||||||
recursive: true
|
recursive: true,
|
||||||
|
onStdout: (data) => console.log(data.toString()),
|
||||||
|
onStderr: (data) => console.error(data.toString())
|
||||||
};
|
};
|
||||||
|
|
||||||
// RSYNC COMMAND
|
// RSYNC COMMAND
|
||||||
@@ -59,8 +61,7 @@ const rsyncCli = async ({
|
|||||||
return nodeRsyncPromise({
|
return nodeRsyncPromise({
|
||||||
...defaultOptions,
|
...defaultOptions,
|
||||||
src: source, dest: rsyncServer, excludeFirst: exclude, port: remotePort,
|
src: source, dest: rsyncServer, excludeFirst: exclude, port: remotePort,
|
||||||
privateKey: privateKeyPath, args, sshCmdArgs,
|
privateKey: privateKeyPath, args, sshCmdArgs
|
||||||
onStdout: (data) => console.log(data), onStderr: (data) => console.error(data)
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user