technology-note/.drone.yml
2022-09-24 15:37:38 +08:00

58 lines
1.4 KiB
YAML

kind: pipeline
type: docker
name: blogPublish
clone:
depth: 1
steps:
- name: pull
image: bitnami/git
volumes:
- name: ssh
path: /app/.ssh
commands:
- cd /app/.ssh
- eval $(ssh-agent)
- ssh-add id_rsa
- cd ../
- mkdir ~/.ssh && ssh ssh-keyscan -p 222 -t rsa gitea.fleyx.com >> ~/.ssh/known_hosts
- git clone --depth 1 ssh://git@gitea.fleyx.com:222/fanxb/BlogGenerate.git
- cd BlogGenerate/source/_posts
- git clone --depth 1 ssh://git@gitea.fleyx.com:222/fanxb/technology-note.git
- sleep 100
- ls -l
# - name: package
# image: node:16-bullseye
environment:
privateKey:
from_secret: privateSsh
# 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
# - md5sum -c app.jar.md5
volumes:
- name: ssh
host:
path: /root/.ssh
- name: npmRep
host:
path: /root/npmRep