123123
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2025-06-24 23:44:40 +08:00
parent c902a0a404
commit 3b1e08b6e6
2 changed files with 106 additions and 5 deletions

View File

@ -3,8 +3,19 @@ type: docker # 当前管道的类型
name: test # 当前管道的名称
steps:
# 第一步:构建项目
- name: 构建
# 第一步:克隆代码
- name: 克隆代码
image: alpine/git
commands:
- git clone $DRONE_REMOTE_URL .
- git checkout $DRONE_COMMIT
when:
event:
- push
- pull_request
# 第二步:构建项目
- name: 构建项目
image: node:18-alpine
commands:
- npm install
@ -14,7 +25,7 @@ steps:
path: /drone/src/node_modules
# 第二步上传静态资源到腾讯云COS (使用另一个插件)
- name: 上传到腾讯云
- name: 静态资源上传到cos
image: ccr.ccs.tencentyun.com/xiaoqidun/gocos
settings:
secret_id:
@ -27,7 +38,7 @@ steps:
strip_prefix: dist
# 第三步:部署到服务器
- name: deploy
- name: 清楚服务器缓存
image: appleboy/drone-ssh
settings:
host:
@ -51,7 +62,7 @@ steps:
- dev
# 第四步:上传构建文件
- name: upload
- name: 上传构建文件
image: appleboy/drone-scp
settings:
host: