ssh-deploy icon indicating copy to clipboard operation
ssh-deploy copied to clipboard

More than one REMOTE_HOST

Open churnd opened this issue 5 years ago • 1 comments

Is it possible to use more than one REMOTE_HOST variable, for when we would have more than one host we want to deploy to?

churnd avatar Jul 15 '20 01:07 churnd

Hey @churnd, you can add multiple steps with same action:

    - name: Deploy to Staging
      uses: easingthemes/[email protected]
      env:
        SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
        SOURCE: "dist/"
        REMOTE_HOST: ${{ secrets.REMOTE_HOST_ST }}
        REMOTE_USER: ${{ secrets.REMOTE_USER }}
        TARGET: ${{ secrets.REMOTE_TARGET }}
    - name: Deploy to Prod
      uses: easingthemes/[email protected]
      env:
        SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
        SOURCE: "dist/"
        REMOTE_HOST: ${{ secrets.REMOTE_HOST_PROD }}
        REMOTE_USER: ${{ secrets.REMOTE_USER }}
        TARGET: ${{ secrets.REMOTE_TARGET }}```

easingthemes avatar Jul 15 '20 22:07 easingthemes

https://github.com/easingthemes/ssh-deploy/issues/20

easingthemes avatar Jan 02 '23 22:01 easingthemes