Run command on host via ssh without depending on untrusted/unknown docker images or javascript libraries.
In other words: a no fuss action to run a remote command.
Depends on openssh
(present in ubuntu-latest).
Paste the private key (SSH_KEY
) and known_hosts (KNOWN_HOST
) into two specific Actions secrets.
runs-on: ubuntu-latest
steps:
- name: Restart daemon
uses: vacare/anofuss-remote@v1
with:
host: example.com
username: deploy
key: ${{ secrets.SSH_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}
command: /after-build.sh
Combine with Anofuss Upload to upload file before and after commands.