#!/usr/bin/env bash echo "Repository name: "$DRONE_REPO_NAME echo "Repository owner: "$DRONE_REPO_OWNER echo "Generating and deploying stryker for user $DRONE_REPO_OWNER and repository $DRONE_REPO_NAME" # /docs must be declared as a temporary volume in drone.yml mkdir -p /docs/stryker/ # Check documentation directory syntax. DOCDIR="Documentation" [ -d "/drone/src/documentation" ] && DOCDIR="documentation" cd /drone/src/$DOCDIR echo "- rsync stryker with remote" [ -d "/drone/src/$DOCDIR/stryker" ] && rsync --rsync-path="mkdir -p /usr/share/nginx/html/$DRONE_REPO_OWNER/stryker/$DRONE_REPO_NAME/ && rsync" -e "ssh -o StrictHostKeyChecking=no" -avz --delete /docs/stryker/ root@nginx:/usr/share/nginx/html/$DRONE_REPO_OWNER/stryker/$DRONE_REPO_NAME/ exit 0