From 50f271b41defabfc810fbdffc103693b41bddb01 Mon Sep 17 00:00:00 2001 From: whale Date: Tue, 26 May 2026 14:59:14 +0800 Subject: [PATCH] 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 --- .devops/自动构建部署.yml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.devops/自动构建部署.yml b/.devops/自动构建部署.yml index c57be08..6ed811e 100644 --- a/.devops/自动构建部署.yml +++ b/.devops/自动构建部署.yml @@ -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