13 lines
381 B
Bash
Executable file
13 lines
381 B
Bash
Executable file
#!/bin/bash
|
|
# Deploy build artifacts to production
|
|
set -euo pipefail
|
|
|
|
VERSION="${1:-latest}"
|
|
DEPLOY_USER="deploy"
|
|
DEPLOY_HOST="prod.nexus.local"
|
|
DEPLOY_PATH="/opt/app"
|
|
|
|
echo "[deploy] Starting deployment of version $VERSION..."
|
|
rsync -av --delete ./dist/ "$DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH/"
|
|
ssh "$DEPLOY_USER@$DEPLOY_HOST" "systemctl restart nexus-app"
|
|
echo "[deploy] Done."
|