2019-02-09 21:17:45 +08: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 05:24:25 +08:00
|
|
|
sh -c "rsync $1 -e 'ssh -i $SSH_PATH/deploy_key -o StrictHostKeyChecking=no' $2 $GITHUB_WORKSPACE/$3 $4"
|