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