fix: use single-line ssh_cmd to avoid JianMu JS parse error

JianMu treats ssh_cmd as a JavaScript expression and cannot handle
newlines. Rewrite the entire command as a single-line string with
semicolon chaining, matching the original project's format.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
whale 2026-05-26 14:59:14 +08:00
parent c6debeafe8
commit 50f271b41d
1 changed files with 1 additions and 14 deletions

View File

@ -20,20 +20,7 @@ workflow:
ssh_ip: '"121.41.222.73"'
ssh_port: '"22"'
ssh_user: '"root"'
ssh_cmd: >-
"if [ -d /root/gitlink-cli/.git ]; then
cd /root/gitlink-cli && git pull;
else
rm -rf /root/gitlink-cli &&
git clone https://gitlink.org.cn/whale_hihihi/gitlink-cli.git /root/gitlink-cli &&
cd /root/gitlink-cli;
fi &&
docker stop gitlink-cli 2>/dev/null;
docker rm gitlink-cli 2>/dev/null;
docker rmi gitlink-cli:latest 2>/dev/null;
docker build --no-cache -t gitlink-cli:latest . &&
docker run -d --name gitlink-cli gitlink-cli:latest &&
echo 'Deploy success'"
ssh_cmd: '"if [ -d /root/gitlink-cli/.git ]; then cd /root/gitlink-cli && git pull; else rm -rf /root/gitlink-cli && git clone https://gitlink.org.cn/whale_hihihi/gitlink-cli.git /root/gitlink-cli && cd /root/gitlink-cli; fi && docker stop gitlink-cli 2>/dev/null; docker rm gitlink-cli 2>/dev/null; docker rmi gitlink-cli:latest 2>/dev/null; docker build --no-cache -t gitlink-cli:latest . && docker run -d --name gitlink-cli gitlink-cli:latest && echo Deploy success"'
needs:
- start
- ref: end