mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-11-14 05:44:52 +00:00
ab39cb849d
Closes #578 Also only publish docs for 1.15.x trunk for now. Tags aren't especially useful until we add a version switcher.
20 lines
595 B
Bash
Executable File
20 lines
595 B
Bash
Executable File
#!/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/build/docs/lua/" \
|
|
"$SSH_USER@$SSH_HOST:/var/www/tweaked.cc/$DEST"
|
|
rsync -avc -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no -p $SSH_PORT" \
|
|
"$GITHUB_WORKSPACE/build/docs/javadoc/" \
|
|
"$SSH_USER@$SSH_HOST:/var/www/tweaked.cc/$DEST/javadoc"
|