This commit is contained in:
19
.drone.yml
Normal file
19
.drone.yml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
kind: pipeline
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Pull latest code from Gitea
|
||||||
|
image: alpine:latest
|
||||||
|
commands:
|
||||||
|
- apk add --no-cache git
|
||||||
|
- cd /www/wwwroot/hgdemo.hgidc.cn/public/web/BlackFruit-web
|
||||||
|
- git clone https://yiqiu:ycyawCOM996.@gitea.ycyaw.com/yiqiu/BlackFruit-UI.git . || git pull
|
||||||
|
- ls -l # 查看目录中的文件是否已经更新
|
||||||
|
|
||||||
|
- name: Restart Nginx
|
||||||
|
image: alpine:latest
|
||||||
|
commands:
|
||||||
|
- apk add --no-cache nginx
|
||||||
|
- nginx -s reload # 重新加载 Nginx 配置,确保服务更新
|
||||||
|
when:
|
||||||
|
branch: main # 只在 main 分支触发,防止其他分支的提交也触发重启
|
||||||
Reference in New Issue
Block a user