more-deployment

This commit is contained in:
lubiana 2024-06-22 22:20:51 +02:00
parent c252b8420b
commit 0661f5dd3f
No known key found for this signature in database
4 changed files with 7 additions and 12 deletions

View file

@ -17,14 +17,6 @@ done
rm ./bin/phpunit
APP_ENV=prod composer install --no-dev -a
mkdir -p ~/.ssh/
# Print the SSH key, replacing newline characters with actual new lines
echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa
# Set appropriate permissions for the SSH key
chmod 600 ~/.ssh/id_rsa
# Add the remote host's key to the known_hosts file to avoid authenticity confirmation
ssh-keyscan -H $HOST >> ~/.ssh/known_hosts
# SCP files to the remote host
rsync -avz --delete public/ ${USERNAME}@${HOST}:${TARGETDIR}