added path checks

pr
Override-6 2 years ago
parent 8676d1f7a3
commit 2645066524

@ -52,7 +52,8 @@ fi
generate "$DOC_DIR" # generates doc using the wanted generator
SERVER_TARGET="/usr/share/nginx/html/$DRONE_REPO_OWNER/$DRONE_REPO_NAME/$DEST"
RELATIVE_PATH=$(echo "$DRONE_REPO_OWNER/$DRONE_REPO_NAME/$DEST/" | tr -s "/")
SERVER_TARGET="/usr/share/nginx/html/$RELATIVE_PATH"
# launches rsync in archive, verbose and compression mode
# creates target directory ($SERVER_TARGET) on server
@ -62,4 +63,4 @@ rsync -avz \
-e "ssh -o StrictHostKeyChecking=no" \
--delete "$GEN_PATH"/* root@nginx:"$SERVER_TARGET"
echo "documentation generated and deployed at https://codefirst.iut.uca.fr/documentation/$DRONE_REPO_OWNER/$DRONE_REPO_NAME/$DEST/index.html"
echo "documentation generated and deployed at https://codefirst.iut.uca.fr/documentation/${RELATIVE_PATH}index.html"

Loading…
Cancel
Save