Add deploy script (#96)

This commit is contained in:
Chenlei Hu
2024-07-06 12:03:54 -04:00
committed by GitHub
parent d1934f27c8
commit 2ae2e827d8
5 changed files with 25 additions and 1 deletions

14
scripts/deploy.js Normal file
View File

@@ -0,0 +1,14 @@
import { copy } from 'fs-extra';
import { config } from "dotenv";
config();
const sourceDir = './dist';
const targetDir = process.env.DEPLOY_COMFYUI_DIR;
copy(sourceDir, targetDir)
.then(() => {
console.log(`Directory copied successfully! ${sourceDir} -> ${targetDir}`);
})
.catch((err) => {
console.error('Error copying directory:', err);
});