From 08817c2208afdd073b43907154f3f7b0e941c853 Mon Sep 17 00:00:00 2001 From: Innei Date: Fri, 10 Sep 2021 14:39:05 +0800 Subject: [PATCH] fix: deploy workdir --- scripts/deploy.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/deploy.js b/scripts/deploy.js index e973ff81..73700dbe 100644 --- a/scripts/deploy.js +++ b/scripts/deploy.js @@ -7,6 +7,7 @@ const owner = 'mx-space' const repo = 'server-next' async function main() { + cd('~/mx') const res = await fetch( `https://api.github.com/repos/${owner}/${repo}/releases/latest`, ) @@ -35,7 +36,7 @@ async function main() { try { await $`lsof -i:2333 -P -n | grep LISTEN` } catch { - await $`pm2 stop ./out/index.js` + await $`pm2 stop ./run/index.js` throw new Error('server is not running') } }