更新 .drone.yml
Some checks reported errors
continuous-integration/drone/push Build encountered an error
continuous-integration/drone Build was killed

This commit is contained in:
罗佳鸿 2024-08-11 08:26:19 +00:00
parent 1060a56557
commit 2516281619

View File

@ -1,3 +1,36 @@
kind: pipeline
type: docker
name: mypubdemo
name: vuepress-build
steps:
- name: install-dependencies
image: node:18 # 使用 Node.js 镜像来安装依赖
commands:
- npm install # 安装项目依赖
- name: build
image: node:18 # 使用 Node.js 镜像来构建项目
commands:
- npm run build # 构建 VuePress 项目
- name: deploy
image: plugins/rsync # 使用 rsync 插件进行部署(可以根据需要选择其他插件)
settings:
remote: user@remote-server:8.219.93.84 # 远程服务器地址
username: $REMOTE_USER # 使用环境变量定义远程用户
password: $REMOTE_PASSWORD # 使用环境变量定义远程密码
source: ./docs/.vuepress/dist # 构建输出目录
target: /path/to/remote/deploy/directory # 远程目标目录
when:
branch: main # 仅在 master 分支上部署
volumes:
- name: npm-cache
host:
path: /home/data/npm/cache # 缓存 npm 依赖
services:
- name: docker
image: docker:26.1.3
commands:
- docker info