name: SSH and echo to file on: push: branches: - main jobs: ssh: runs-on: ubuntu-latest steps: - name: SSH into host uses: appleboy/ssh-action@v1 with: host: ${{ inputs.host }} username: ${{ secrets.HOST_USERNAME }} key: ${{ secrets.RUNNER_SSH_PRIVATEKEY }} script: | echo "Hello, world!" >> ~/hello.txt