Deploy script: protect .env and .db files from being overwritten
Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled

This commit is contained in:
2025-12-13 16:04:07 +01:00
parent 267fdd0d39
commit 6a063bfe89

View File

@ -48,13 +48,15 @@ sshpass -p "$SERVER_PASS" rsync -avz --delete \
--exclude '.git' \
frontend/ $SERVER_USER@$SERVER_HOST:$SERVER_PATH/frontend/
# Sync backend
# Sync backend (exclude .env to preserve server config!)
sshpass -p "$SERVER_PASS" rsync -avz --delete \
--exclude '__pycache__' \
--exclude '.pytest_cache' \
--exclude 'venv' \
--exclude '.git' \
--exclude '*.pyc' \
--exclude '.env' \
--exclude '*.db' \
backend/ $SERVER_USER@$SERVER_HOST:$SERVER_PATH/backend/
echo -e "\n${YELLOW}[5/5] Building and restarting on server...${NC}"