mirror of
https://github.com/easingthemes/ssh-deploy
synced 2025-04-22 00:02:18 +00:00
Add ssh script execution option
This commit is contained in:
parent
40f855a08b
commit
28bda61b75
7
.github/workflows/e2e.yml
vendored
7
.github/workflows/e2e.yml
vendored
@ -55,8 +55,8 @@ jobs:
|
|||||||
cat index.html
|
cat index.html
|
||||||
|
|
||||||
- name: e2e Test published ssh-deploy action
|
- name: e2e Test published ssh-deploy action
|
||||||
uses: easingthemes/ssh-deploy@main
|
uses: easingthemes/ssh-deploy@v3.1.0
|
||||||
env:
|
with:
|
||||||
# SSH_PRIVATE_KEY: $EXAMPLE_SSH_PRIVATE_KEY
|
# SSH_PRIVATE_KEY: $EXAMPLE_SSH_PRIVATE_KEY
|
||||||
# REMOTE_HOST: $EXAMPLE_REMOTE_HOST1
|
# REMOTE_HOST: $EXAMPLE_REMOTE_HOST1
|
||||||
REMOTE_USER: ${{ env.TEST_USER }}
|
REMOTE_USER: ${{ env.TEST_USER }}
|
||||||
@ -64,3 +64,6 @@ jobs:
|
|||||||
SOURCE: "test_project/"
|
SOURCE: "test_project/"
|
||||||
TARGET: "/var/www/html/"
|
TARGET: "/var/www/html/"
|
||||||
EXCLUDE: "/dist/, /node_modules/"
|
EXCLUDE: "/dist/, /node_modules/"
|
||||||
|
SCRIPT: |
|
||||||
|
whoami
|
||||||
|
ls -al
|
||||||
|
@ -31,6 +31,10 @@ inputs:
|
|||||||
description: "An array of folder to exclude"
|
description: "An array of folder to exclude"
|
||||||
required: false
|
required: false
|
||||||
default: ""
|
default: ""
|
||||||
|
SCRIPT:
|
||||||
|
description: "Script to run on host machine"
|
||||||
|
required: false
|
||||||
|
default: "ls"
|
||||||
outputs:
|
outputs:
|
||||||
status:
|
status:
|
||||||
description: "Status"
|
description: "Status"
|
||||||
|
0
src/remoteCmd.js
Normal file
0
src/remoteCmd.js
Normal file
@ -5,7 +5,7 @@ const validateRsync = (callback = () => {}) => {
|
|||||||
const rsyncCli = commandExists("rsync");
|
const rsyncCli = commandExists("rsync");
|
||||||
if (rsyncCli) {
|
if (rsyncCli) {
|
||||||
console.log('⚠️ [CLI] Rsync exists');
|
console.log('⚠️ [CLI] Rsync exists');
|
||||||
const rsyncVersion = execSync("rsync --version", { stdio: 'inherit' });
|
execSync("rsync --version", { stdio: 'inherit' });
|
||||||
return callback();
|
return callback();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user