mirror of
https://github.com/easingthemes/ssh-deploy.git
synced 2025-04-30 19:50:44 -04:00
change RSYNC_STDOUT to string
This commit is contained in:
parent
4e7456f7be
commit
177f5b4b79
4 changed files with 10 additions and 9 deletions
13
.github/workflows/e2e.yml
vendored
13
.github/workflows/e2e.yml
vendored
|
@ -64,9 +64,10 @@ jobs:
|
||||||
SOURCE: "test_project/"
|
SOURCE: "test_project/"
|
||||||
TARGET: "/var/www/html/"
|
TARGET: "/var/www/html/"
|
||||||
EXCLUDE: "/dist/, /node_modules/"
|
EXCLUDE: "/dist/, /node_modules/"
|
||||||
# SCRIPT_BEFORE: |
|
SCRIPT_BEFORE: |
|
||||||
# whoami
|
whoami
|
||||||
# ls -al
|
ls -al
|
||||||
# SCRIPT_AFTER: |
|
SCRIPT_AFTER: |
|
||||||
# whoami
|
whoami
|
||||||
# ls -al
|
ls -al
|
||||||
|
echo $RSYNC_STDOUT
|
||||||
|
|
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
|
@ -17,7 +17,7 @@ const remoteCmd = async (content, privateKeyPath, isRequired, label) => new Prom
|
||||||
writeToFile({ dir: githubWorkspace, filename, content });
|
writeToFile({ dir: githubWorkspace, filename, content });
|
||||||
console.log(`Executing remote script: ssh -i ${privateKeyPath} ${sshServer}`, content);
|
console.log(`Executing remote script: ssh -i ${privateKeyPath} ${sshServer}`, content);
|
||||||
exec(
|
exec(
|
||||||
`DEBIAN_FRONTEND=noninteractive ssh -i ${privateKeyPath} ${sshServer} 'RSYNC_STDOUT=${process.env.RSYNC_STDOUT} bash -s' < ${filename}`,
|
`DEBIAN_FRONTEND=noninteractive ssh -i ${privateKeyPath} ${sshServer} 'RSYNC_STDOUT="${process.env.RSYNC_STDOUT}" bash -s' < ${filename}`,
|
||||||
(err, data, stderr) => {
|
(err, data, stderr) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
const message = `⚠️ [CMD] Remote script failed: ${err.message}`;
|
const message = `⚠️ [CMD] Remote script failed: ${err.message}`;
|
||||||
|
|
|
@ -67,7 +67,7 @@ const sshDeploy = async (params) => {
|
||||||
await validateRsync();
|
await validateRsync();
|
||||||
const stdout = await rsyncCli(params);
|
const stdout = await rsyncCli(params);
|
||||||
console.log('✅ [Rsync] finished.', stdout);
|
console.log('✅ [Rsync] finished.', stdout);
|
||||||
process.env.RSYNC_STDOUT = stdout;
|
process.env.RSYNC_STDOUT = `${stdout}`;
|
||||||
return stdout;
|
return stdout;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue