This commit is contained in:
@ -1,88 +0,0 @@
|
|||||||
kind: pipeline # 定义一个管道
|
|
||||||
type: docker # 当前管道的类型
|
|
||||||
name: test # 当前管道的名称
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# 第一步:构建项目
|
|
||||||
- name: 构建
|
|
||||||
image: node:18-alpine
|
|
||||||
commands:
|
|
||||||
- npm install
|
|
||||||
- npm run build
|
|
||||||
volumes:
|
|
||||||
- name: node_modules_cache
|
|
||||||
path: /drone/src/node_modules
|
|
||||||
|
|
||||||
# 第二步:上传静态资源到腾讯云COS
|
|
||||||
- name: 上传到腾讯云
|
|
||||||
image: ccr.ccs.tencentyun.com/dronestock/cos
|
|
||||||
settings:
|
|
||||||
endpoint: https://files-1302416092.cos.ap-shanghai.myqcloud.com
|
|
||||||
secret:
|
|
||||||
id:
|
|
||||||
from_secret: cos_secret_id
|
|
||||||
key:
|
|
||||||
from_secret: cos_secret_key
|
|
||||||
|
|
||||||
# 第三步:部署到服务器
|
|
||||||
- name: deploy
|
|
||||||
image: appleboy/drone-ssh
|
|
||||||
settings:
|
|
||||||
host:
|
|
||||||
from_secret: server_host
|
|
||||||
username:
|
|
||||||
from_secret: server_username
|
|
||||||
password:
|
|
||||||
from_secret: server_password
|
|
||||||
# 或者使用SSH密钥
|
|
||||||
# key:
|
|
||||||
# from_secret: server_ssh_key
|
|
||||||
port: 22
|
|
||||||
script:
|
|
||||||
- rm -rf /www/wwwroot/show.zguiy.com/*
|
|
||||||
- mkdir -p /www/wwwroot/show.zguiy.com/
|
|
||||||
- chmod 755 /www/wwwroot/show.zguiy.com/
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
- master
|
|
||||||
- dev
|
|
||||||
|
|
||||||
# 第四步:上传构建文件
|
|
||||||
- name: upload
|
|
||||||
image: appleboy/drone-scp
|
|
||||||
settings:
|
|
||||||
host:
|
|
||||||
from_secret: server_host
|
|
||||||
username:
|
|
||||||
from_secret: server_username
|
|
||||||
password:
|
|
||||||
from_secret: server_password
|
|
||||||
# 或者使用SSH密钥
|
|
||||||
# key:
|
|
||||||
# from_secret: server_ssh_key
|
|
||||||
port: 22
|
|
||||||
source: dist/*
|
|
||||||
target: /www/wwwroot/show.zguiy.com/
|
|
||||||
strip_components: 1
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
- master
|
|
||||||
- dev
|
|
||||||
|
|
||||||
# 定义数据卷用于缓存node_modules
|
|
||||||
volumes:
|
|
||||||
- name: node_modules_cache
|
|
||||||
host:
|
|
||||||
path: /tmp/drone_cache/node_modules
|
|
||||||
|
|
||||||
# 触发条件
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
- master
|
|
||||||
- dev
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
- pull_request
|
|
@ -1,90 +0,0 @@
|
|||||||
kind: pipeline # 定义一个管道
|
|
||||||
type: docker # 当前管道的类型
|
|
||||||
name: test # 当前管道的名称
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# 第一步:构建项目
|
|
||||||
- name: 构建
|
|
||||||
image: node:18-alpine
|
|
||||||
commands:
|
|
||||||
- npm install
|
|
||||||
- npm run build
|
|
||||||
volumes:
|
|
||||||
- name: node_modules_cache
|
|
||||||
path: /drone/src/node_modules
|
|
||||||
|
|
||||||
# 第二步:上传静态资源到腾讯云COS (使用另一个插件)
|
|
||||||
- name: 上传到腾讯云
|
|
||||||
image: ccr.ccs.tencentyun.com/xiaoqidun/gocos
|
|
||||||
settings:
|
|
||||||
secret_id:
|
|
||||||
from_secret: cos_secret_id
|
|
||||||
secret_key:
|
|
||||||
from_secret: cos_secret_key
|
|
||||||
bucket_url: https://files-1302416092.cos.ap-shanghai.myqcloud.com
|
|
||||||
source: dist
|
|
||||||
target: /
|
|
||||||
strip_prefix: dist
|
|
||||||
|
|
||||||
# 第三步:部署到服务器
|
|
||||||
- name: deploy
|
|
||||||
image: appleboy/drone-ssh
|
|
||||||
settings:
|
|
||||||
host:
|
|
||||||
from_secret: server_host
|
|
||||||
username:
|
|
||||||
from_secret: server_username
|
|
||||||
password:
|
|
||||||
from_secret: server_password
|
|
||||||
# 或者使用SSH密钥
|
|
||||||
# key:
|
|
||||||
# from_secret: server_ssh_key
|
|
||||||
port: 22
|
|
||||||
script:
|
|
||||||
- rm -rf /www/wwwroot/show.zguiy.com/*
|
|
||||||
- mkdir -p /www/wwwroot/show.zguiy.com/
|
|
||||||
- chmod 755 /www/wwwroot/show.zguiy.com/
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
- master
|
|
||||||
- dev
|
|
||||||
|
|
||||||
# 第四步:上传构建文件
|
|
||||||
- name: upload
|
|
||||||
image: appleboy/drone-scp
|
|
||||||
settings:
|
|
||||||
host:
|
|
||||||
from_secret: server_host
|
|
||||||
username:
|
|
||||||
from_secret: server_username
|
|
||||||
password:
|
|
||||||
from_secret: server_password
|
|
||||||
# 或者使用SSH密钥
|
|
||||||
# key:
|
|
||||||
# from_secret: server_ssh_key
|
|
||||||
port: 22
|
|
||||||
source: dist/*
|
|
||||||
target: /www/wwwroot/show.zguiy.com/
|
|
||||||
strip_components: 1
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
- master
|
|
||||||
- dev
|
|
||||||
|
|
||||||
# 定义数据卷用于缓存node_modules
|
|
||||||
volumes:
|
|
||||||
- name: node_modules_cache
|
|
||||||
host:
|
|
||||||
path: /tmp/drone_cache/node_modules
|
|
||||||
|
|
||||||
# 触发条件
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
- master
|
|
||||||
- dev
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
- pull_request
|
|
102
.drone copy.yml
102
.drone copy.yml
@ -1,102 +0,0 @@
|
|||||||
kind: pipeline # 定义一个管道
|
|
||||||
type: docker # 当前管道的类型
|
|
||||||
name: test # 当前管道的名称
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# 第一步:构建项目
|
|
||||||
- name: build
|
|
||||||
image: ccr.ccs.tencentyun.com/library/node:18-alpine
|
|
||||||
commands:
|
|
||||||
- npm install
|
|
||||||
- npm run build
|
|
||||||
volumes:
|
|
||||||
- name: node_modules_cache
|
|
||||||
path: /drone/src/node_modules
|
|
||||||
|
|
||||||
# 第二步:上传静态资源到腾讯云COS
|
|
||||||
- name: upload-to-cos
|
|
||||||
image: tencentcloudcli/coscmd:latest
|
|
||||||
environment:
|
|
||||||
COS_SECRET_ID:
|
|
||||||
from_secret: cos_secret_id
|
|
||||||
COS_SECRET_KEY:
|
|
||||||
from_secret: cos_secret_key
|
|
||||||
COS_REGION:
|
|
||||||
from_secret: cos_region
|
|
||||||
COS_BUCKET:
|
|
||||||
from_secret: cos_bucket
|
|
||||||
commands:
|
|
||||||
# 配置coscmd
|
|
||||||
- coscmd config -a $${COS_SECRET_ID} -s $${COS_SECRET_KEY} -b $${COS_BUCKET} -r $${COS_REGION}
|
|
||||||
# 上传public文件夹下的所有文件
|
|
||||||
- coscmd upload -r public/ /static/
|
|
||||||
# 设置文件访问权限为公共读
|
|
||||||
- coscmd putobjectacl -r /static/ public-read
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
- master
|
|
||||||
- dev
|
|
||||||
|
|
||||||
# 第三步:部署到服务器
|
|
||||||
- name: deploy
|
|
||||||
image: appleboy/drone-ssh
|
|
||||||
settings:
|
|
||||||
host:
|
|
||||||
from_secret: server_host
|
|
||||||
username:
|
|
||||||
from_secret: server_username
|
|
||||||
password:
|
|
||||||
from_secret: server_password
|
|
||||||
# 或者使用SSH密钥
|
|
||||||
# key:
|
|
||||||
# from_secret: server_ssh_key
|
|
||||||
port: 22
|
|
||||||
script:
|
|
||||||
- rm -rf /www/wwwroot/show.zguiy.com/*
|
|
||||||
- mkdir -p /www/wwwroot/show.zguiy.com/
|
|
||||||
- chmod 755 /www/wwwroot/show.zguiy.com/
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
- master
|
|
||||||
- dev
|
|
||||||
|
|
||||||
# 第四步:上传构建文件
|
|
||||||
- name: upload
|
|
||||||
image: appleboy/drone-scp
|
|
||||||
settings:
|
|
||||||
host:
|
|
||||||
from_secret: server_host
|
|
||||||
username:
|
|
||||||
from_secret: server_username
|
|
||||||
password:
|
|
||||||
from_secret: server_password
|
|
||||||
# 或者使用SSH密钥
|
|
||||||
# key:
|
|
||||||
# from_secret: server_ssh_key
|
|
||||||
port: 22
|
|
||||||
source: dist/*
|
|
||||||
target: /www/wwwroot/show.zguiy.com/
|
|
||||||
strip_components: 1
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
- master
|
|
||||||
- dev
|
|
||||||
|
|
||||||
# 定义数据卷用于缓存node_modules
|
|
||||||
volumes:
|
|
||||||
- name: node_modules_cache
|
|
||||||
host:
|
|
||||||
path: /tmp/drone_cache/node_modules
|
|
||||||
|
|
||||||
# 触发条件
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
- master
|
|
||||||
- dev
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
- pull_request
|
|
86
.drone1.yml
86
.drone1.yml
@ -1,86 +0,0 @@
|
|||||||
kind: pipeline # 定义一个管道
|
|
||||||
type: docker # 当前管道的类型
|
|
||||||
name: test # 当前管道的名称
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# 第一步:构建项目
|
|
||||||
- name: 构建
|
|
||||||
image: node:18-alpine
|
|
||||||
commands:
|
|
||||||
- npm install
|
|
||||||
- npm run build
|
|
||||||
volumes:
|
|
||||||
- name: node_modules_cache
|
|
||||||
path: /drone/src/node_modules
|
|
||||||
|
|
||||||
# 第二步:上传静态资源到腾讯云COS
|
|
||||||
- name: 上传到腾讯云
|
|
||||||
image: ccr.ccs.tencentyun.com/dronestock/cos
|
|
||||||
settings:
|
|
||||||
endpoint: https://files-1302416092.cos.ap-shanghai.myqcloud.com
|
|
||||||
secret:
|
|
||||||
id: xAKIDeAXigQxIQMCrKbfcOxJRL4atzrY2ILFvx
|
|
||||||
key: WoureDYgdOzR0eJn47AC6oJcopdDZhcK
|
|
||||||
|
|
||||||
# 第三步:部署到服务器
|
|
||||||
- name: deploy
|
|
||||||
image: appleboy/drone-ssh
|
|
||||||
settings:
|
|
||||||
host:
|
|
||||||
from_secret: server_host
|
|
||||||
username:
|
|
||||||
from_secret: server_username
|
|
||||||
password:
|
|
||||||
from_secret: server_password
|
|
||||||
# 或者使用SSH密钥
|
|
||||||
# key:
|
|
||||||
# from_secret: server_ssh_key
|
|
||||||
port: 22
|
|
||||||
script:
|
|
||||||
- rm -rf /www/wwwroot/show.zguiy.com/*
|
|
||||||
- mkdir -p /www/wwwroot/show.zguiy.com/
|
|
||||||
- chmod 755 /www/wwwroot/show.zguiy.com/
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
- master
|
|
||||||
- dev
|
|
||||||
|
|
||||||
# 第四步:上传构建文件
|
|
||||||
- name: upload
|
|
||||||
image: appleboy/drone-scp
|
|
||||||
settings:
|
|
||||||
host:
|
|
||||||
from_secret: server_host
|
|
||||||
username:
|
|
||||||
from_secret: server_username
|
|
||||||
password:
|
|
||||||
from_secret: server_password
|
|
||||||
# 或者使用SSH密钥
|
|
||||||
# key:
|
|
||||||
# from_secret: server_ssh_key
|
|
||||||
port: 22
|
|
||||||
source: dist/*
|
|
||||||
target: /www/wwwroot/show.zguiy.com/
|
|
||||||
strip_components: 1
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
- master
|
|
||||||
- dev
|
|
||||||
|
|
||||||
# 定义数据卷用于缓存node_modules
|
|
||||||
volumes:
|
|
||||||
- name: node_modules_cache
|
|
||||||
host:
|
|
||||||
path: /tmp/drone_cache/node_modules
|
|
||||||
|
|
||||||
# 触发条件
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
- master
|
|
||||||
- dev
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
- pull_request
|
|
@ -1 +1 @@
|
|||||||
VITE_PUBLIC = https://cdn.files.zguiy.com/
|
VITE_PUBLIC = https://cdn.files.zguiy.com/test/
|
@ -2,12 +2,14 @@
|
|||||||
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
||||||
|
"target": "ES2020",
|
||||||
|
"module": "ES2020",
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
|
||||||
/* Linting */
|
/* Linting */
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
"erasableSyntaxOnly": true,
|
|
||||||
"noFallthroughCasesInSwitch": true,
|
"noFallthroughCasesInSwitch": true,
|
||||||
"noUncheckedSideEffectImports": true
|
"noUncheckedSideEffectImports": true
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user