All checks were successful
continuous-integration/drone/push Build is passing
- 解压官方默认主题 default_yfMBA.tar.gz 到 clientarea/hgcloud/ - .gitignore 排除压缩包和临时解压目录 - drone 新增步骤: 同步 hgcloud 到 /clientarea/template/pc/
34 lines
1.2 KiB
YAML
34 lines
1.2 KiB
YAML
kind: pipeline
|
||
type: exec
|
||
name: web模块任务
|
||
|
||
platform:
|
||
os: linux
|
||
arch: amd64
|
||
|
||
steps:
|
||
- name: Pull latest code from Gitea
|
||
commands:
|
||
# 添加 safe.directory,解决 Git “dubious ownership” 报错
|
||
- git config --global --add safe.directory /www/wwwroot/hgdemo.hgidc.cn/public/web/BlackFruit-web
|
||
|
||
- cd /www/wwwroot/hgdemo.hgidc.cn/public/web/BlackFruit-web
|
||
|
||
# 判断是否已有 .git,没有就 clone,有就强制同步远程最新代码
|
||
- if [ ! -d .git ]; then git clone https://yiqiu:***@gitea.ycyaw.com/yiqiu/BlackFruit-UI.git .; else git fetch --all && git reset --hard origin/main; fi
|
||
|
||
# 将主题配置插件同步到运行目录
|
||
- cp -rf /www/wwwroot/hgdemo.hgidc.cn/public/web/BlackFruit-web/plugins/addon/theme_configurator /www/wwwroot/hgdemo.hgidc.cn/public/plugins/addon/
|
||
|
||
# 将会员中心全局主题 hgcloud 同步到运行目录
|
||
- cp -rf /www/wwwroot/hgdemo.hgidc.cn/public/web/BlackFruit-web/clientarea/hgcloud /www/wwwroot/hgdemo.hgidc.cn/public/clientarea/template/pc/
|
||
|
||
- name: Restart Nginx
|
||
commands:
|
||
- nginx -s reload
|
||
when:
|
||
branch:
|
||
include:
|
||
- main
|
||
- master
|