diff --git a/.drone.yml b/.drone.yml index 7de220b..6c9ca47 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,7 +1,7 @@ --- kind: pipeline type: ssh -name: car4s +name: "服务器部署" server: host: 110.40.192.42:8022 @@ -13,28 +13,27 @@ clone: disable: true steps: - - name: Git Set + - name: "Git 设置" environment: GIT_NAME: from_secret: GIT_NAME GIT_PASSWD: from_secret: GIT_PASSWD commands: - - echo "Git 设置" + - export GIT_NAME=$GIT_NAME + - export GIT_PASSWD=$GIT_PASSWD - cd /www/wwwroot/car.des8.com - git remote rm origin - - git remote add origin http://heibai2006:4167208@git.des8.com/heibai2006/car4s.git - #- echo "[remote \"origin\"]\n" > ~/.gitconfig - #- echo "url = http://$GIT_NAME:$GIT_PASSWD@git.des8.com/heibai2006/car4s.git" > ~/.gitconfig + - git remote add origin http://$GIT_NAME:$GIT_PASSWD@git.des8.com/heibai2006/car4s.git - - name: Clone + - name: "Clone 代码" commands: - echo "Clone 代码" - cd /www/wwwroot/car.des8.com - pwd && ls -l - git pull origin master - - name: Env + - name: "设置Env配置" commands: - echo "设置Env配置" - cd /www/wwwroot/car.des8.com @@ -51,13 +50,21 @@ steps: - echo "debug = false" >> .env - cat .env - - name: Chown to www + - name: "更改文件权限" commands: - echo "更改文件权限" + - cd /www/wwwroot/car.des8.com - chown -R www:www ./ - pwd && ls -l + - name: "清除缓存" + commands: + - echo "清除缓存" + - cd /www/wwwroot/car.des8.com/runtime + - rm -rf ./cache + - rm -rf ./temp + - pwd && ls -l trigger: branch: - - master \ No newline at end of file + - master \ No newline at end of file