easingthemes / ssh-deploy

GitHub Action for deploying code via rsync over ssh. (with NodeJS)
MIT License
1.17k stars 144 forks source link

How to skip rsync ? #165

Closed abcfy2 closed 11 months ago

abcfy2 commented 1 year ago

I just want to execute ssh command on remote ssh server. So I omitted SOURCE and TARGET. But seems rsync still executed.

codespearhead commented 11 months ago

@abcfy2 Show us your yml file.

abcfy2 commented 11 months ago
  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
codespearhead commented 11 months ago

@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.

abcfy2 commented 11 months ago

Oh Thanks. Because it's named ssh-deploy. So I expect this could execute ssh only actions 😆 . Thanks.