1π
β
The problem with this resides in its on-demand aspect.
You need to detect somehow there are new commits, and then initiate your SSH+pull+restart.
Depending on your remote hosting service (GitHub/GitLab,β¦), you would set a webhook listener on each reachable, to automate that step.
Once the listener receive notice of a new commit, it can in turn connect to the clusters and operate your commands.
An Ansible playbook would be a good fit, since Ansible is agentless, and relies mainly on SSH to execute scripts on remote machines.
π€VonC
Source:stackexchange.com