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 15:10:11 +08:00
|
|
|
environment:
|
2022-09-24 15:04:34 +08:00
|
|
|
privateKey:
|
|
|
|
from_secret: privateSsh
|
2022-09-23 16:54:38 +08:00
|
|
|
commands:
|
2022-09-24 15:04:34 +08:00
|
|
|
- echo $privateKey
|
2022-09-24 15:11:33 +08:00
|
|
|
- echo $privateKey > sshKey
|
2022-09-24 15:11:45 +08:00
|
|
|
- sleep 40
|
2022-09-24 15:11:33 +08:00
|
|
|
- cat sshKey
|
2022-09-24 15:04:34 +08:00
|
|
|
- ssh-add sshKey
|
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 15:04:34 +08:00
|
|
|
# - md5sum -c app.jar.md5
|