add deploy logs

This commit is contained in:
Dobromir Popov
2024-07-07 23:44:15 +03:00
parent c80362b504
commit e6165fd38f

View File

@ -10,13 +10,13 @@ if [ "$UPDATE_CODE_FROM_GIT" = "true" ]; then
mkdir /tmp/clone mkdir /tmp/clone
# Clone the repository # Clone the repository
echo "\r\n\r\n Cloning repository..." echo "\r\n\r\n Cloning repository..." | tee -a /app/logs/deploy.txt
git clone -b ${GIT_BRANCH:-main} --depth 1 https://$GIT_USERNAME:${GIT_PASSWORD//@/%40}@git.d-popov.com/popov/mwitnessing.git /tmp/clone || exit 1 git clone -b ${GIT_BRANCH:-main} --depth 1 https://$GIT_USERNAME:${GIT_PASSWORD//@/%40}@git.d-popov.com/popov/mwitnessing.git /tmp/clone || exit 1
# Synchronize all files except package.json, package-lock.json, and the contents of /public/content # Synchronize all files except package.json, package-lock.json, and the contents of /public/content
# rsync -av --filter='P /public/content/' --exclude 'package.json' --exclude 'package-lock.json' /tmp/clone/ /app/ || echo "Rsync failed: Issue synchronizing files" # rsync -av --filter='P /public/content/' --exclude 'package.json' --exclude 'package-lock.json' /tmp/clone/ /app/ || echo "Rsync failed: Issue synchronizing files"
echo "\r\n\r\n Synchronizing files..." echo "\r\n\r\n Synchronizing files..."
rsync -av --exclude '/public/content' --exclude 'package.json' --exclude 'package-lock.json' /tmp/clone/ /app/ || echo "Rsync failed: Issue synchronizing files" rsync -av --exclude '/public/content' --exclude 'package.json' --exclude 'package-lock.json' /tmp/clone/ /app/ || echo "Rsync failed: Issue synchronizing files" | tee -a /app/logs/deploy.txt
echo "\r\n\r\n Checking for changes in package files..." echo "\r\n\r\n Checking for changes in package files..."