Spaces:
Runtime error
Runtime error
Update ftp-upload.js
Browse files- ftp-upload.js +6 -5
ftp-upload.js
CHANGED
@@ -12,11 +12,12 @@ const remoteUrl = `https://user:${token}@huggingface.co/spaces/soiz1/simple-edit
|
|
12 |
console.log("接続完了!...");
|
13 |
try {
|
14 |
console.log("Git リポジトリを初期化...");
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
20 |
console.log("✅ アップロードが完了しました!");
|
21 |
} catch (err) {
|
22 |
console.error("❌ アップロードに失敗しました:", err.message);
|
|
|
12 |
console.log("接続完了!...");
|
13 |
try {
|
14 |
console.log("Git リポジトリを初期化...");
|
15 |
+
execSync("git init", { cwd: repoPath, shell: true });
|
16 |
+
execSync(`git remote add origin ${remoteUrl}`, { cwd: repoPath, shell: true });
|
17 |
+
execSync("git add .", { cwd: repoPath, shell: true });
|
18 |
+
execSync('git commit -m "Automated deploy"', { cwd: repoPath, shell: true });
|
19 |
+
execSync("git push -f origin master", { cwd: repoPath, shell: true });
|
20 |
+
|
21 |
console.log("✅ アップロードが完了しました!");
|
22 |
} catch (err) {
|
23 |
console.error("❌ アップロードに失敗しました:", err.message);
|