mirror of
https://github.com/easingthemes/ssh-deploy.git
synced 2024-11-19 08:08:05 +08:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
47f78aa96e | ||
|
8e19e0d6bc | ||
|
da62405174 | ||
|
2a85c96230 | ||
|
ac90bba983 | ||
|
05ddb64347 | ||
|
8f715957ab |
23
.github/workflows/e2e.yml
vendored
23
.github/workflows/e2e.yml
vendored
@@ -3,6 +3,21 @@ name: e2e Test
|
||||
on:
|
||||
push:
|
||||
branches: [ 'main' ]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ARGS:
|
||||
description: 'ARGS'
|
||||
required: true
|
||||
default: '-rltgoDzvO --delete --chmod=ugo=rwX --progress'
|
||||
EXCLUDE:
|
||||
description: 'EXCLUDE'
|
||||
required: true
|
||||
default: '/dist/, /node_modules/'
|
||||
SSH_CMD_ARGS:
|
||||
description: 'SSH_CMD_ARGS'
|
||||
required: true
|
||||
default: '-o StrictHostKeyChecking=no, -o UserKnownHostsFile=/dev/null'
|
||||
|
||||
|
||||
env:
|
||||
TEST_HOST_DOCKER: ./test
|
||||
@@ -51,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
|
||||
|
||||
@@ -61,10 +79,11 @@ jobs:
|
||||
# SSH_PRIVATE_KEY: $EXAMPLE_SSH_PRIVATE_KEY
|
||||
# REMOTE_HOST: $EXAMPLE_REMOTE_HOST
|
||||
REMOTE_USER: ${{ env.TEST_USER }}
|
||||
ARGS: "-rltgoDzvO"
|
||||
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: "/dist/, /node_modules/"
|
||||
EXCLUDE: ${{ github.event.inputs.EXCLUDE || '/dist/, /node_modules/' }}
|
||||
SCRIPT_BEFORE: |
|
||||
whoami
|
||||
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,17 @@
|
||||
## [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)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Add manual inputs for e2e test ([8f71595](https://github.com/easingthemes/ssh-deploy/commit/8f715957ab9283ab2934dd1e5be9d78f2eaf3fae))
|
||||
|
||||
## [3.3.1](https://github.com/easingthemes/ssh-deploy/compare/v3.3.0...v3.3.1) (2023-01-02)
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@draganfilipovic/ssh-deploy",
|
||||
"version": "3.3.1",
|
||||
"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": [
|
||||
|
@@ -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
|
||||
});
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user