Browse Source

removed json version, fixed buildscript

feature/zola
root 3 months ago
parent
commit
d13fccda8b
  1. 33
      .drone.json
  2. 5
      blog.sh

33
.drone.json

@ -1,33 +0,0 @@
{
"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"
},
"SSH_KEY": {
"from_secret": "ssh_key"
}
},
"steps": [
{
"name": "building the blog",
"image": "alpine:edge",
"commands": [
"mkdir -p $HOME/.ssh",
"echo $KNOWN_HOSTS > $HOME/.ssh/known_hosts",
"echo $SSH_KEY > $HOME/.ssh/id_ed25519",
"apk add --no-cache janet bash openssh",
"./blog.sh",
"tar czf - www.aphrodite.dev | ssh $REMOTE_HOST \"cd $REMOTE_PATH && tar mxzf -\""
]
}
]
}

5
blog.sh

@ -55,11 +55,6 @@ if [[ -d "$out_dir" ]]; then
rm -rf "$out_dir"
fi
if [[ ! -f ~/.config/aphrodite.env ]]; then
echo "no ~/.config/aphrodite.env file found"
exit 1
fi
echo "Building..."
cp -r www "$out_dir"
find "$out_dir" -type f -exec "$blog_sh" {} \;
Loading…
Cancel
Save