This commit is contained in:
@ -5,7 +5,7 @@ name: test # 当前管道的名称
|
|||||||
steps:
|
steps:
|
||||||
# 第一步:构建项目
|
# 第一步:构建项目
|
||||||
- name: build
|
- name: build
|
||||||
image: node:18-alpine
|
image: registry.cn-hangzhou.aliyuncs.com/library/node:18-alpine
|
||||||
commands:
|
commands:
|
||||||
- npm install
|
- npm install
|
||||||
- npm run build
|
- npm run build
|
||||||
@ -15,7 +15,7 @@ steps:
|
|||||||
|
|
||||||
# 第二步:上传静态资源到腾讯云COS
|
# 第二步:上传静态资源到腾讯云COS
|
||||||
- name: upload-to-cos
|
- name: upload-to-cos
|
||||||
image: tencentcloudcli/coscmd:latest
|
image: registry.cn-hangzhou.aliyuncs.com/tencentcloud/coscmd:latest
|
||||||
environment:
|
environment:
|
||||||
COS_SECRET_ID:
|
COS_SECRET_ID:
|
||||||
from_secret: cos_secret_id
|
from_secret: cos_secret_id
|
||||||
@ -40,7 +40,7 @@ steps:
|
|||||||
|
|
||||||
# 第三步:部署到服务器
|
# 第三步:部署到服务器
|
||||||
- name: deploy
|
- name: deploy
|
||||||
image: appleboy/drone-ssh
|
image: registry.cn-hangzhou.aliyuncs.com/appleboy/drone-ssh
|
||||||
settings:
|
settings:
|
||||||
host:
|
host:
|
||||||
from_secret: server_host
|
from_secret: server_host
|
||||||
@ -64,7 +64,7 @@ steps:
|
|||||||
|
|
||||||
# 第四步:上传构建文件
|
# 第四步:上传构建文件
|
||||||
- name: upload
|
- name: upload
|
||||||
image: appleboy/drone-scp
|
image: registry.cn-hangzhou.aliyuncs.com/appleboy/drone-scp
|
||||||
settings:
|
settings:
|
||||||
host:
|
host:
|
||||||
from_secret: server_host
|
from_secret: server_host
|
||||||
|
Reference in New Issue
Block a user