From 9ad16fd3cc51f9bf36674d580d4fd9ae1fc66bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Thu, 23 Dec 2021 14:47:56 -0500 Subject: [drone-ci]: add deploy --- devscripts/comments.bash | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 devscripts/comments.bash (limited to 'devscripts/comments.bash') diff --git a/devscripts/comments.bash b/devscripts/comments.bash new file mode 100644 index 0000000..8aebff5 --- /dev/null +++ b/devscripts/comments.bash @@ -0,0 +1,22 @@ +#!/bin/bash + +# Prepare SSH +home="/root" + +mkdir -p "$home/.ssh" + +printf "StrictHostKeyChecking no\n" > "$home/.ssh/config" + +chmod 0700 "$home/.ssh/config" + +keyfile="$home/.ssh/id_rsa" +echo "$SSH_KEY" | grep -q "ssh-ed25519" +if [ $? -eq 0 ]; then + printf "Using ed25519 based key\n" + keyfile="$home/.ssh/id_ed25519" +fi +echo "$SSH_KEY" > $keyfile +chmod 0600 $keyfile + +# pull comments +git clone git@git.conocimientoslibres.ga:cl-syscomment.git ./content/comments -- cgit v1.2.3