From 3260812b2365c49964b73f0a6d4c239b256fe6ce Mon Sep 17 00:00:00 2001 From: zguiy <1415466602@qq.com> Date: Tue, 24 Jun 2025 16:46:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9-=E5=A2=9E=E5=8A=A0=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone copy 2.yml | 8 -------- .drone copy.yml | 3 --- .drone1.yml | 43 ------------------------------------------- go.md | 3 +++ main.go | 7 +++++++ 5 files changed, 10 insertions(+), 54 deletions(-) delete mode 100644 .drone copy 2.yml delete mode 100644 .drone copy.yml delete mode 100644 .drone1.yml create mode 100644 go.md create mode 100644 main.go diff --git a/.drone copy 2.yml b/.drone copy 2.yml deleted file mode 100644 index 646918f..0000000 --- a/.drone copy 2.yml +++ /dev/null @@ -1,8 +0,0 @@ -kind: pipeline # 定义一个管道 -type: docker # 当前管道的类型 -name: test # 当前管道的名称 -steps: # 定义管道的执行步骤 - - name: test # 步骤名称 - image: node:latest # 当前步骤使用的镜像 - commands: # 当前步骤执行的命令 - - echo 测试drone执行 \ No newline at end of file diff --git a/.drone copy.yml b/.drone copy.yml deleted file mode 100644 index 70836d9..0000000 --- a/.drone copy.yml +++ /dev/null @@ -1,3 +0,0 @@ -kind: pipeline # 定义一个管道 -type: docker # 当前管道的类型 -name: test # 当前管道的名称 diff --git a/.drone1.yml b/.drone1.yml deleted file mode 100644 index 25d3de5..0000000 --- a/.drone1.yml +++ /dev/null @@ -1,43 +0,0 @@ -kind: pipeline -type: docker -name: vite-build - -steps: - # 1. 安装依赖 - - name: install dependencies - image: node:16 - commands: - - npm install - - # 2. 打包 Vite 项目 - - name: build vite project - image: node:16 - commands: - - vite build - - # 3. 将构建产物上传到目标服务器 - - name: deploy to server - image: appleboy/drone-ssh - settings: - host: 124.220.228.140 # 目标服务器地址 - username: root # 远程服务器用户名 - password: - from_secret: ssh_password # 从 Drone secrets 中获取 SSH 密码 - port: 22 # SSH 端口 - command_timeout: 5m # 执行命令的超时设置 - script: - - cd /home/docker/drone # 进入构建目录 - - rm -rf /www/wwwroot/show.zguiy.com/dist # 删除旧的构建产物 - - cp -r /workspace/dist /www/wwwroot/show.zguiy.com/dist # 复制新的构建产物 - - chmod -R 755 /www/wwwroot/show.zguiy.com/dist # 设置目录权限 - - systemctl restart nginx # 重启 Nginx(如果使用 Nginx) - -volumes: - - name: build-output - host: - path: /home/docker/drone # 本地构建目录 - -trigger: - branch: - - master - event: [ push ] diff --git a/go.md b/go.md new file mode 100644 index 0000000..76d3b33 --- /dev/null +++ b/go.md @@ -0,0 +1,3 @@ +module test + +go 1.17 \ No newline at end of file diff --git a/main.go b/main.go new file mode 100644 index 0000000..693c153 --- /dev/null +++ b/main.go @@ -0,0 +1,7 @@ +package main + +import "fmt" + +func main() { + fmt.Printf("Hello World from Test!"); +} \ No newline at end of file