31 lines
688 B
YAML
31 lines
688 B
YAML
kind: pipeline
|
|
type: docker
|
|
name: vuepress-build
|
|
steps:
|
|
- name: install-and-build
|
|
image: node:20.16.0
|
|
commands:
|
|
- chmod +x ./run.sh # 确保脚本是可执行的
|
|
- ./run.sh # 执行构建脚本
|
|
|
|
- name: deploy
|
|
image: plugins/rsync
|
|
settings:
|
|
remote: 8.219.93.84
|
|
username: 15185626476
|
|
password: LJH@123456
|
|
source: ./docs/.vuepress/dist
|
|
target: /path/to/remote/deploy/directory
|
|
when:
|
|
branch: main # 仅在 main 分支上部署
|
|
|
|
volumes:
|
|
- name: npm-cache
|
|
host:
|
|
path: /home/data/npm/cache # 缓存 npm 依赖
|
|
|
|
services:
|
|
- name: docker
|
|
image: docker:26.1.3
|
|
commands:
|
|
- docker info |