Compare commits

...

27 Commits

Author SHA1 Message Date
ce16b3396c 1331333
All checks were successful
continuous-integration/drone/push Build is passing
2025-07-05 20:30:46 +08:00
eca130ebcc 8888
Some checks failed
continuous-integration/drone/push Build is failing
2025-07-05 20:20:11 +08:00
36986d8438 1345
Some checks failed
continuous-integration/drone/push Build is failing
2025-07-05 20:07:52 +08:00
f632dca052 45
Some checks failed
continuous-integration/drone/push Build is failing
2025-07-05 15:57:30 +08:00
9638ba18e6 12345
Some checks failed
continuous-integration/drone/push Build is failing
2025-07-05 15:55:48 +08:00
5948c5174a 444
Some checks failed
continuous-integration/drone/push Build is failing
2025-07-05 15:52:18 +08:00
627d64601a 333
Some checks failed
continuous-integration/drone/push Build is failing
2025-07-05 15:50:27 +08:00
a12add3225 222
Some checks failed
continuous-integration/drone/push Build is failing
2025-07-05 15:47:13 +08:00
3b870afa24 111
Some checks failed
continuous-integration/drone/push Build is failing
2025-07-05 15:42:41 +08:00
3f0fe051fc 122222
All checks were successful
continuous-integration/drone/push Build is passing
2025-06-28 17:03:53 +08:00
9397a45351 121212
All checks were successful
continuous-integration/drone/push Build is passing
2025-06-24 23:59:19 +08:00
f80f3f5039 121212
All checks were successful
continuous-integration/drone/push Build is passing
2025-06-24 23:54:14 +08:00
765198c4c7 32432
All checks were successful
continuous-integration/drone/push Build is passing
2025-06-24 23:48:28 +08:00
3b1e08b6e6 123123
Some checks failed
continuous-integration/drone/push Build is failing
2025-06-24 23:44:40 +08:00
c902a0a404 12344
All checks were successful
continuous-integration/drone/push Build is passing
2025-06-24 23:41:01 +08:00
50cd862586 243544
All checks were successful
continuous-integration/drone/push Build is passing
2025-06-24 23:37:41 +08:00
7c443c6ea2 355345
All checks were successful
continuous-integration/drone/push Build is passing
2025-06-24 23:30:45 +08:00
44f5081623 1234444
All checks were successful
continuous-integration/drone/push Build is passing
2025-06-24 23:02:15 +08:00
b8710db94f 请问11
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2025-06-24 22:55:57 +08:00
e9af1269d5 35555 2025-06-24 22:54:44 +08:00
151ea36640 驱蚊器
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2025-06-24 22:45:53 +08:00
eb1553507b 22345
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2025-06-24 22:38:16 +08:00
19ccbfde29 3555
Some checks failed
continuous-integration/drone/push Build is failing
2025-06-24 21:22:55 +08:00
c676a158c0 111133
Some checks failed
continuous-integration/drone/push Build is failing
2025-06-24 21:21:06 +08:00
c6d9e84c65 234234235
Some checks failed
continuous-integration/drone/push Build is failing
2025-06-24 20:12:27 +08:00
c88a5f18df 4355646
Some checks failed
continuous-integration/drone/push Build is failing
2025-06-24 20:10:16 +08:00
e63cd3895b 45667 2025-06-24 20:10:11 +08:00
10 changed files with 133 additions and 72 deletions

91
.drone copy 2.yml Normal file
View File

@ -0,0 +1,91 @@
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: 静态资源上传到cos
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: /test
strip_prefix: dist
# 第三步:部署到服务器
- name: 清除服务器缓存
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: 上传构建文件
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

View File

@ -4,8 +4,8 @@ name: test # 当前管道的名称
steps:
# 第一步:构建项目
- name: build
image: ccr.ccs.tencentyun.com/library/node:18-alpine
- name: 构建
image: node:18-alpine
commands:
- npm install
- npm run build
@ -13,30 +13,18 @@ steps:
- name: node_modules_cache
path: /drone/src/node_modules
# 第二步上传静态资源到腾讯云COS
- name: upload-to-cos
image: tencentcloudcli/coscmd:latest
environment:
COS_SECRET_ID:
# 第二步上传静态资源到腾讯云COS (使用另一个插件)
- name: 上传到腾讯云
image: ccr.ccs.tencentyun.com/xiaoqidun/gocos
settings:
secret_id:
from_secret: cos_secret_id
COS_SECRET_KEY:
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
bucket_url: https://files-1302416092.cos.ap-shanghai.myqcloud.com
source: dist
target: /test
strip_prefix: dist
# 第三步:部署到服务器
- name: deploy

View File

@ -1,31 +1,29 @@
kind: pipeline # 定义一个管道
type: docker # 当前管道的类型
name: test # 当前管道的名称
kind: pipeline
type: docker
name: test
steps:
# 第一步:构建项目
- name: 构建
- name: 构建项目
image: node:18-alpine
commands:
- npm install
- rm -rf node_modules
- npm ci
- npm run build
volumes:
- name: node_modules_cache
path: /drone/src/node_modules
# 第二步上传静态资源到腾讯云COS
- name: 上传到腾讯云
image: ccr.ccs.tencentyun.com/dronestock/cos
- name: 静态资源上传到cos
image: ccr.ccs.tencentyun.com/xiaoqidun/gocos
settings:
endpoint: https://files-1302416092.cos.ap-shanghai.myqcloud.com
secret:
id:
from_secret: cos_secret_id
key:
from_secret: cos_secret_key
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: /test
strip_prefix: dist
# 第三步:部署到服务器
- name: deploy
- name: 清除服务器缓存
image: appleboy/drone-ssh
settings:
host:
@ -34,9 +32,6 @@ steps:
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/*
@ -48,8 +43,7 @@ steps:
- master
- dev
# 第四步:上传构建文件
- name: upload
- name: 上传构建文件
image: appleboy/drone-scp
settings:
host:
@ -58,9 +52,6 @@ steps:
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/
@ -71,13 +62,9 @@ steps:
- master
- dev
# 定义数据卷用于缓存node_modules
volumes:
- name: node_modules_cache
host:
path: /tmp/drone_cache/node_modules
# 移除 node_modules 缓存挂载
# volumes: 已删除
# 触发条件
trigger:
branch:
- main

View File

@ -1 +1 @@
VITE_PUBLIC = https://cdn.files.zguiy.com/static/
VITE_PUBLIC = https://cdn.files.zguiy.com/test/

3
go.md
View File

@ -1,3 +0,0 @@
module test
go 1.17

View File

@ -1,7 +0,0 @@
package main
import "fmt"
func main() {
fmt.Printf("Hello World from Test!");
}

View File

@ -6,6 +6,9 @@
<script setup lang="ts">
import HelloWorld from './components/HelloWorld.vue'
const a="符合法1134353453311333规计划"
</script>

View File

@ -15,7 +15,7 @@ onMounted(()=>{
console.log('所有环境变量:', import.meta);
url.value = publicPath + 'ui/背景.png'
console.log('最终图片路径:', url.value);
console.log('1最终图片路径:', url.value);
})

View File

@ -2,12 +2,14 @@
"extends": "@vue/tsconfig/tsconfig.dom.json",
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"target": "ES2020",
"module": "ES2020",
"moduleResolution": "bundler",
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"erasableSyntaxOnly": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},

View File

@ -6,7 +6,7 @@ export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd());
return {
base: './', //打包后的相对路径
base: env.VITE_PUBLIC || './', //使用环境变量设置资源路径,默认为相对路径
server: {
host: true,