mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-14 20:20:30 +00:00
17 lines
393 B
Bash
17 lines
393 B
Bash
|
#!/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" \
|
||
|
"$GITHUB_WORKSPACE/doc/" \
|
||
|
"$SSH_USER@$SSH_HOST:/var/www/tweaked.cc/$DEST"
|