This script will watch a local directory and on change will sync to a remote directory. The script can be easily modified to do whatever you want on a change event.
Install
pip install watchdog
Python script that monitors a Mac OS X folder and on change syncs with remote site
Python