Feature/ssh cmd (#94)

* feat: Add SSH remote script support -  before and after rsync

* fix: remove __dirname

* feat: add sshCmdArgs option

* Add promise instead of callback

* fix: improve logs

* fix: Add simple command exists instead of a plugin

* add non interactive install

* feat: add onStderr and onStdout logs

* Improve reject messages

* feat: Add RSYNC_STDOUT env variable

* emoji updates

* fix: update workflow actions
This commit is contained in:
Dragan Filipović 2023-01-02 21:06:33 +01:00 committed by GitHub
parent a5d8edb941
commit ec9347f8c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 373 additions and 242 deletions

View file

@ -18,9 +18,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies

View file

@ -31,11 +31,11 @@ jobs:
language: [ 'javascript' ]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
@ -44,4 +44,4 @@ jobs:
npm run build --if-present
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2

View file

@ -2,7 +2,7 @@ name: e2e Test
on:
push:
branches: [ 'main' ]
branches: [ 'feature/ssh-cmd' ]
env:
TEST_HOST_DOCKER: ./test
@ -55,7 +55,7 @@ jobs:
cat index.html
- name: e2e Test published ssh-deploy action
uses: easingthemes/ssh-deploy@main
uses: easingthemes/ssh-deploy@feature/ssh-cmd
env:
# SSH_PRIVATE_KEY: $EXAMPLE_SSH_PRIVATE_KEY
# REMOTE_HOST: $EXAMPLE_REMOTE_HOST1
@ -64,3 +64,10 @@ jobs:
SOURCE: "test_project/"
TARGET: "/var/www/html/"
EXCLUDE: "/dist/, /node_modules/"
SCRIPT_BEFORE: |
whoami
ls -al
SCRIPT_AFTER: |
whoami
ls -al
echo $RSYNC_STDOUT

View file

@ -16,9 +16,9 @@ jobs:
node-version: [ 16.x ]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix['node-version'] }}
- name: Install dependencies
@ -28,11 +28,11 @@ jobs:
- name: Run Tests
run: npm test --if-present
- name: Release
uses: cycjimmy/semantic-release-action@v2
uses: cycjimmy/semantic-release-action@v3
with:
dry_run: ${{ github.event.inputs.dryrun == 'true' }}
extra_plugins: |
@semantic-release/changelog@3.0.0
@semantic-release/changelog
@semantic-release/git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}