37 lines
776 B
YAML
37 lines
776 B
YAML
kind: pipeline
|
|
type: docker
|
|
name: build-and-run
|
|
|
|
volumes:
|
|
- name: node_modules
|
|
host:
|
|
path: /var/lib/drone/node_modules
|
|
- name: vuepress_output
|
|
host:
|
|
path: /var/lib/drone/vuepress_output
|
|
|
|
steps:
|
|
- name: build-project
|
|
image: node:16.15.1
|
|
volumes:
|
|
- name: node_modules
|
|
path: /drone/src/node_modules
|
|
commands:
|
|
- pwd
|
|
- ls -alt
|
|
- npm config set registry https://registry.npm.taobao.org
|
|
- npm install
|
|
- npm run build
|
|
|
|
- name: run-vuepress
|
|
image: node:16.15.1
|
|
volumes:
|
|
- name: node_modules
|
|
path: /drone/src/node_modules
|
|
- name: vuepress_output
|
|
path: /drone/src/.vuepress/dist
|
|
commands:
|
|
- cd /drone/src
|
|
- npm install -g vuepress
|
|
- npm run dev
|