2020-01-05 19:11:59 +08:00
|
|
|
#!/bin/sh
|
2019-02-09 21:17:45 +08:00
|
|
|
|
2020-01-05 19:06:14 +08:00
|
|
|
# Start the SSH agent and load key.
|
|
|
|
source agent-start "$GITHUB_ACTION"
|
|
|
|
echo "$INPUT_REMOTE_KEY" | agent-add
|
2019-02-09 21:17:45 +08:00
|
|
|
|
2020-01-05 19:19:21 +08:00
|
|
|
# Add strict errors and deploy.
|
|
|
|
set -eu
|
2020-01-05 19:06:14 +08:00
|
|
|
sh -c "rsync $INPUT_SWITCHES -e 'ssh -o StrictHostKeyChecking=no -p $INPUT_REMOTE_PORT $INPUT_RSH' $GITHUB_WORKSPACE/$INPUT_PATH $INPUT_REMOTE_USER@$INPUT_REMOTE_HOST:$INPUT_REMOTE_PATH"
|