2020-04-10 09:27:53 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
DEST="${GITHUB_REF#refs/*/}"
|
|
|
|
echo "Uploading docs to https://tweaked.cc/$DEST"
|
|
|
|
|
|
|
|
# Setup ssh key
|
|
|
|
mkdir -p "$HOME/.ssh/"
|
|
|
|
echo "$SSH_KEY" > "$HOME/.ssh/key"
|
|
|
|
chmod 600 "$HOME/.ssh/key"
|
|
|
|
|
|
|
|
# And upload
|
|
|
|
rsync -avc -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no -p $SSH_PORT" \
|
2020-11-12 19:01:50 +00:00
|
|
|
"$GITHUB_WORKSPACE/build/docs/lua/" \
|
2021-10-17 17:14:22 +00:00
|
|
|
"$SSH_USER@$SSH_HOST:/$DEST"
|
2020-11-12 19:04:55 +00:00
|
|
|
rsync -avc -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no -p $SSH_PORT" \
|
|
|
|
"$GITHUB_WORKSPACE/build/docs/javadoc/" \
|
2021-10-17 17:14:22 +00:00
|
|
|
"$SSH_USER@$SSH_HOST:/$DEST/javadoc"
|