Add basic GitHub Action

This commit is contained in:
2023-12-20 10:44:38 +01:00
commit 05e907702c
4 changed files with 72 additions and 0 deletions

16
deploy.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/sh
set -euo pipefail
options="$1"
SSH_HOME="${HOME}/.ssh"
SSH_KEYPATH="${SSH_HOME}/deploy_key"
mkdir -p "$SSH_HOME"
echo "$SSH_KEY" > "$SSH_KEYPATH"
chmod 600 "$SSH_KEYPATH"
echo "Deploying..."
rsync $options \
-e "ssh -i $SSH_KEYPATH -o StrictHostKeyChecking=no" \
"$RSYNC_SOURCE" "$RSYNC_USERHOST":"$RSYNC_DESTINATION"