Hermanverschooten / ssh-copy-command-action

Copy a file over SSH and execute a command afterwards.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ssh-copy-command-action

Copy a file over SSH and execute a command afterwards.

  - name: Deploy
    uses: Hermanverschooten/ssh-copy-command-action@v1
    env:
      SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }}
      SOURCE: "./source.tar.gz"
      REMOTE_HOST: my_host.example.org
      REMOTE_USER: root
      TARGET: "/opt/dest"
      CMD: "./deploy"

This action uses scp to copy the file to the remote destination, then reuses that master control socket to run the given command over ssh.

About

Copy a file over SSH and execute a command afterwards.

License:MIT License