1

I have php deployer set up which will deploy all my files to staging server whenever I run dep deploy:staging. Now I want to know if there is a way to run that deployer command whenever the file got changes.

I have tried using Facebook's watchman, I managed to watch the file changes but I couldn't run the deployer command. This is how I tried.

watchman watch /my/project/folder
watchman -- trigger /my/project/folder deployme '*.php' -- dep deploy:staging

I am not sure exact reason but I think dep command was not runnable with watchman because I try running batch commands like "cd","ls" and it seems to shows the result on the log file.

So I want to know if there is any other way of watching the file change and run the deployer command automatically? One example of what I want to do would be exactly how Shopify works with the deployment.

zaw
  • 684
  • 1
  • 11
  • 30
  • I assume your staging environment is where you check the behavior of your code while modifying the code. Then performing continous deployments might not be the best thing to do because this is an heavy process. Did you consider that instead of modifying your local code and deploying it on staging, you plug your IDE directly on your staging environment (so you modify the remote files, not the local file), which is a lot easier and quicker ? – matks Sep 21 '17 at 15:26

0 Answers0