Here are a few options to implement.
1) Use Devcs to automate the deployment, it has inbuilt support of git and CI/CD. Easy to implement but you need to procure this service.
2) If you use any collaboration tools like bitbucket / Github enterprise or any other tools you can automate through simple scripts. OIC also provides rest apis to integrate easily with any tools. You can export /import/update the code through these api's.
3) Plain Java API's to automate the deployment through the rest api's.