Browse Source

added drone ci config

feature/zola
root 3 months ago
parent
commit
fe15692793
  1. 22
      .drone.yml
  2. 4
      blog.sh

22
.drone.yml

@ -0,0 +1,22 @@
---
kind: pipeline
type: docker
name: blog-deploy
environment:
REMOTE_HOST:
from_secret: remote_host
REMOTE_PATH:
from_secret: remote_path
KNOWN_HOSTS:
from_secret: known_hosts
steps:
- name: building the blog
image: 'alpine:edge'
commands:
- mkdir -p $HOME/.ssh
- echo $KNOWN_HOSTS > $HOME/.ssh/known_hosts
- apk add --no-cache janet bash openssh
- ./blog.sh
- 'tar czf - www.aphrodite.dev | ssh $REMOTE_HOST "cd $REMOTE_PATH && tar mxzf -"'

4
blog.sh

@ -63,7 +63,3 @@ fi
echo "Building..."
cp -r www "$out_dir"
find "$out_dir" -type f -exec "$blog_sh" {} \;
echo "Deploying..."
source ~/.config/aphrodite.env
tar czf - www.aphrodite.dev | ssh $REMOTE_HOST "cd $REMOTE_PATH && tar mxzf -"
Loading…
Cancel
Save