Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -34,21 +34,22 @@ def get_logs():
|
|
34 |
|
35 |
import re
|
36 |
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
return
|
46 |
-
|
47 |
-
|
48 |
)
|
49 |
-
|
50 |
-
|
51 |
-
|
|
|
52 |
)
|
53 |
|
54 |
|
|
|
34 |
|
35 |
import re
|
36 |
|
37 |
+
# app.py ― get_deployment_update만 교체
|
38 |
+
def get_deployment_update(code_md: str):
|
39 |
+
clean = remove_code_block(code_md)
|
40 |
+
result = deploy_to_vercel(clean)
|
41 |
+
|
42 |
+
m = re.search(r"https?://[\\w-]+\\.vercel\\.app", result)
|
43 |
+
if m: # 성공
|
44 |
+
url = m.group(0)
|
45 |
+
return (
|
46 |
+
f"<div class='deploy-success'>✅ 배포 완료!<br>"
|
47 |
+
f"<a href='{url}' target='_blank'>{url}</a></div>"
|
48 |
)
|
49 |
+
# 실패
|
50 |
+
safe = html.escape(result)
|
51 |
+
return (
|
52 |
+
f"<div class='deploy-error'>❌ 배포 실패<br>{safe}</div>"
|
53 |
)
|
54 |
|
55 |
|