Closed abcfy2 closed 11 months ago
@abcfy2 Show us your yml file.
deploy:
runs-on: ubuntu-latest
needs:
- docker-build
if: ${{ contains(
fromJson('["push", "workflow_dispatch"]'),
github.event_name) &&
contains(
fromJson('["main"]'),
github.ref_name)
}}
steps:
- name: Deploy to EC2
uses: easingthemes/ssh-deploy@v4
with:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
SCRIPT_AFTER: |
echo hello
@abcfy2 What are you planning to use ssh-deploy for?
Because it's a GitHub Action wrapping rsync via ssh. Hence, it's not intended to perform non-rsync deployments.
If you just want to ssh into a virtual machine, it's best to use something intended for this purpose, such as ssh-action.
Oh Thanks. Because it's named ssh-deploy
. So I expect this could execute ssh only actions 😆 . Thanks.
I just want to execute ssh command on remote ssh server. So I omitted
SOURCE
andTARGET
. But seems rsync still executed.