1 2 3 4 5 6
import subprocess def deploy(branch): subprocess.run(["git", "checkout", branch]) subprocess.run(["git", "push", branch], shell=False)