Automating uploading files in PhpStorm

I have an action that I do over and over again in PhpStorm. I've tried all kinds of things inside PhpStorm to automate the process, but they all have annoying side-effects or doesn't work.

I do this about 100+ times per day, so I'm desperate to find a solution. It's driving me nuts!

What I'm after is a way to upload two specific files from the tree-view to the remote server. The two files are generated, so I don't have them open.

Here is a bit of information, about what I'm looking at: . It's the highligted option in the dropdown menu that I'm trying to press, for the two files.

My attempts:

  1. Make a folder-trigger. Doesn't work since no file is added or removed.
  2. Record a macro and make it fire. Doesn't work since it records where on the screen I'm pressing when recording the macro. And if I've scrolled down the tree-view or opened a folder, then everything moves and the macro clicks a bunch of other stuff.
  3. I also tried 'Looking for an image on the screen' and then screenshotting the file-names and trying to find those coordinates. I couldn't get this to work at all, though.

Can this be achieved using Keyboard Maestro? And any words of advice on how to set it up, so I don't all of a sudden upload another file or folder?