test02/.drone.yml
罗佳鸿 8e7b0c2410
Some checks failed
部署文档 / deploy-gh-pages (push) Waiting to run
continuous-integration/drone/push Build is failing
更新 .drone.yml
2024-08-16 09:05:54 +00:00

30 lines
692 B
YAML

kind: pipeline
type: docker
name: build-vuepress
volumes:
- name: node_modules
host:
path: /var/lib/drone/node_modules
- name: vuepress_output
host:
path: /var/lib/drone/vuepress_output
steps:
- name: build-vuepress
image: node:20.16.0
volumes:
- name: node_modules
path: /drone/src/node_modules
- name: vuepress_output
path: /drone/src/docs/.vuepress/dist
commands:
- cd /drone/src
- npm install
- npm run docs:build
- name: deploy
image: alpine:latest
commands:
- apk add --no-cache rsync # Install rsync
- rsync -av --delete /drone/src/docs/.vuepress/dist/ /usr/share/nginx/html/