technology-note/.drone.yml

55 lines
1.3 KiB
YAML
Raw Normal View History

2022-09-23 16:54:38 +08:00
kind: pipeline
type: docker
name: blogPublish
2022-09-24 11:10:06 +08:00
clone:
depth: 1
2022-09-23 16:54:38 +08:00
steps:
2022-09-24 11:10:06 +08:00
- name: pull
image: bitnami/git
2022-09-24 14:25:31 +08:00
volumes:
- name: app
path: /app
- name: ssh
2022-09-24 14:54:44 +08:00
path: /app/ssh
2022-09-23 16:54:38 +08:00
commands:
2022-09-24 14:55:52 +08:00
- ls -l /app/ssh
2022-09-24 14:54:44 +08:00
- ssh-add /app/ssh/id_rsa
2022-09-24 14:25:31 +08:00
- cd /app/BlogGenerate
2022-09-24 14:55:52 +08:00
- ls -l
2022-09-24 14:25:31 +08:00
- git pull
- cd /app/blogPublish/source/_posts/technology-note
- git pull
- ls
2022-09-24 11:10:06 +08:00
# - name: package
# image: node:16-bullseye
# volumes:
# - name: app
# path: /app
# commands:
# - cd /app
# - npm install -g hexo --registry=https://registry.npmmirror.com
# - npm install --registry=https://registry.npmmirror.com
# - hexo v && hexo clean && hexo g
# - cd public
# - tar -czf ../dist.tar.gz *
# - cd public
# - name: deploy
# image: drillster/drone-rsync
# settings:
# hosts: [ "fleyx.com:22000" ]
# source: ./target
# target: ~/packages
# include: [ "app.jar", "app.jar.md5" ]
# script:
# - cd ~/packages
2022-09-24 14:25:31 +08:00
# - md5sum -c app.jar.md5
volumes: # 定义流水线挂载目录,用于共享数据
- name: app
host:
path: /dataPool/systemData/linux_env/data/drone/workspace/blogPublish
- name: ssh
host:
path: /dataPool/systemData/linux_env/data/drone/ssh