I’m not that familiar with gradle so my wish might be very easy to fix, but are there a way to expand the gradle deploy command to deploy to external server?
I would like to just do ‘gradle deploy production’ or such to deploy to a configured server. Is this possible or even recommended?
At work we would use an artifact repository and fetch it from the after release with jenkins or like that and deploy but for very simple sites that is something that I dont want to bother with.
It would be awesome to just be able to configure a to deploy to and do it via gradle.
It’s possible to do anything in Gradle What you can do in your case is to configure a SSH connection via Gradle and then just SCP (secure copy) into the deploy folder. I have not done this myself, but I think it’s a relatively small job using existing Gradle plugins (for example: https://github.com/int128/gradle-ssh-plugin).
With the above plugin I would do something like this (keep in mind that I have not tried it and it’s just written inside this editor without any actually tests):