部署测试
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
孟凡懂 2022-06-29 11:23:12 +08:00
parent 71e34d3d40
commit a01077514d

View File

@ -1,7 +1,7 @@
--- ---
kind: pipeline kind: pipeline
type: ssh type: ssh
name: car4s name: "服务器部署"
server: server:
host: 110.40.192.42:8022 host: 110.40.192.42:8022
@ -13,28 +13,27 @@ clone:
disable: true disable: true
steps: steps:
- name: Git Set - name: "Git 设置"
environment: environment:
GIT_NAME: GIT_NAME:
from_secret: GIT_NAME from_secret: GIT_NAME
GIT_PASSWD: GIT_PASSWD:
from_secret: GIT_PASSWD from_secret: GIT_PASSWD
commands: commands:
- echo "Git 设置" - export GIT_NAME=$GIT_NAME
- export GIT_PASSWD=$GIT_PASSWD
- cd /www/wwwroot/car.des8.com - cd /www/wwwroot/car.des8.com
- git remote rm origin - git remote rm origin
- git remote add origin http://heibai2006:4167208@git.des8.com/heibai2006/car4s.git - git remote add origin http://$GIT_NAME:$GIT_PASSWD@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
- name: Clone - name: "Clone 代码"
commands: commands:
- echo "Clone 代码" - echo "Clone 代码"
- cd /www/wwwroot/car.des8.com - cd /www/wwwroot/car.des8.com
- pwd && ls -l - pwd && ls -l
- git pull origin master - git pull origin master
- name: Env - name: "设置Env配置"
commands: commands:
- echo "设置Env配置" - echo "设置Env配置"
- cd /www/wwwroot/car.des8.com - cd /www/wwwroot/car.des8.com
@ -51,13 +50,21 @@ steps:
- echo "debug = false" >> .env - echo "debug = false" >> .env
- cat .env - cat .env
- name: Chown to www - name: "更改文件权限"
commands: commands:
- echo "更改文件权限" - echo "更改文件权限"
- cd /www/wwwroot/car.des8.com
- chown -R www:www ./ - chown -R www:www ./
- pwd && ls -l - pwd && ls -l
- name: "清除缓存"
commands:
- echo "清除缓存"
- cd /www/wwwroot/car.des8.com/runtime
- rm -rf ./cache
- rm -rf ./temp
- pwd && ls -l
trigger: trigger:
branch: branch:
- master - master