7ce8831401
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
11 lines
452 B
Bash
Executable file
11 lines
452 B
Bash
Executable file
#!/usr/bin/env sh
|
|
|
|
export SSHDIR="$HOME/.ssh"
|
|
mkdir -p "$SSHDIR"
|
|
echo "$ACTIONS_DEPLOY_KEY" > "$SSHDIR/key"
|
|
chmod 600 "$SSHDIR/key"
|
|
export SERVER_DEPLOY_STRING="$SSH_USERNAME@$SERVER_ADDRESS:$SERVER_DESTINATION"
|
|
cd "$GITHUB_WORKSPACE/app/build/outputs/apk/release"
|
|
rm output.json
|
|
rsync -ahvcr --omit-dir-times --progress --delete --no-o --no-g -e "ssh -i $SSHDIR/key -o StrictHostKeyChecking=no -p $SSH_PORT" . "$SERVER_DEPLOY_STRING" || exit 1
|
|
exit 0
|