Jelajahi Sumber

[#1] chore: reset git head before pulling in deployment script

Lange François 3 minggu lalu
induk
melakukan
bed51d044e
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      scripts/deploy_to_server.py

+ 1 - 1
scripts/deploy_to_server.py

@@ -34,7 +34,7 @@ def deploy():
         ssh.connect(host, username=user, password=password, timeout=10)
         print("Connected successfully!")
         
-        command = "cd food_project && rm -f git_version.txt git_id.txt && git pull && docker-compose up -d --build"
+        command = "cd food_project && git reset --hard && rm -f git_version.txt git_id.txt && git pull && docker-compose up -d --build"
         print(f"Executing: {command}")
         
         stdin, stdout, stderr = ssh.exec_command(command)