ssh-deploy/entrypoint.sh

14 lines
287 B
Bash
Raw Normal View History

2019-02-09 16:17:45 +03:00
#!/bin/sh
set -eu
# Set deploy key
SSH_PATH="$HOME/.ssh"
mkdir "$SSH_PATH"
echo "$DEPLOY_KEY" > "$SSH_PATH/deploy_key"
chmod 600 "$SSH_PATH/deploy_key"
# Do deployment
2019-09-26 00:52:29 +03:00
sh -c "rsync $ARGS -e 'ssh -i $SSH_PATH/deploy_key -o StrictHostKeyChecking=no' $GITHUB_WORKSPACE/$SOURCE $TARGET"