futtern/deploy/prepare-deploy.sh
lubiana 57b4e33028
All checks were successful
/ ls (pull_request) Successful in 31s
/ ls (push) Successful in 31s
fix paths in prepare deploy and add local deploy script
2024-06-24 21:19:11 +02:00

23 lines
383 B
Bash
Executable file

#!/usr/bin/env sh
TARGETDIR='deploy/app'
if [ -d $TARGETDIR ]; then
rm -rf $TARGETDIR
fi
mkdir $TARGETDIR
cd $TARGETDIR || return
pathsToCopy="public bin config migrations src templates composer.json composer.lock symfony.lock .env"
for path in $pathsToCopy
do
cp -r ../../"$path" ./
done
rm ./bin/phpunit
APP_ENV=prod composer install --no-dev -a
rm -rf ./var/cache
cd -