to change a javascript file, I need to change the same file on the secondary server?
normaly yes.
You may take a look at Version Control, which could do the deployment work for you.
https://docops.ca.com/ca-service-management/14-1/en/building/building-ca-service-desk-manager/how-to-version-system-customizations-across-ca-sdm-servers
Regards
...........Michael