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.