def cmd_deploy(commit_msg):
    cmd_build()
    # Keep original directory.
    original_dir = os.getcwd() 
    os.chdir(OUTPUT_DIR)
    try:
        # Add a CNAME record if needed:
        # Set up the CNAME file:
        run_sys('echo ' + CNAME_DOMAIN + ' > CNAME')
        res_git_add = run_sys('git add -A')
        if res_git_add != 0:
            raise ExceptDeploy("git add -A didn't work.")

        commit_res = run_sys('git commit -m "%s"'%(commit_msg))
        if commit_res != 0:
            print("Commit returned error code.")

        res_git_push = run_sys('git push origin master')
        if res_git_push != 0:
            raise ExceptDeploy("Git push origin master didn't work.")
    finally:
        # Restore original directory:
        os.chdir(original_dir)
First build the website.
dataset/ETHPy150Open realcr/freedomlayer_website/website_tool.py/cmd_deploy