Update ci workflows (#1804)

This commit is contained in:
Lianmin Zheng
2024-10-26 04:32:36 -07:00
committed by GitHub
parent c26507484f
commit 6aa94b967c
34 changed files with 135 additions and 140 deletions

22
docs/deploy.py Normal file
View File

@@ -0,0 +1,22 @@
#!/usr/bin/python3
import os
from datetime import datetime
def run_cmd(cmd):
print(cmd)
os.system(cmd)
run_cmd("cd $DOC_SITE_PATH; git pull")
# (Optional) Remove old files
# run_cmd("rm -rf $ALPA_SITE_PATH/*")
run_cmd("cp -r _build/html/* $DOC_SITE_PATH")
cmd_message = f"Update {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}"
run_cmd(
f"cd $DOC_SITE_PATH; git add .; git commit -m '{cmd_message}'; git push origin main"
)