Add basic GitHub Action
This commit is contained in:
16
deploy.sh
Executable file
16
deploy.sh
Executable 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"
|
||||
Reference in New Issue
Block a user