diff --git a/deploy.sh b/deploy.sh index 456f75a..656a17e 100755 --- a/deploy.sh +++ b/deploy.sh @@ -6,47 +6,54 @@ echo "-----------------------------------" # Enter maintenance mode or return true # if already is in maintenance mode -echo "1/11 Entering maintenance mode" +echo "1/12 Entering maintenance mode" (php8.1 artisan down) || true # Stash all changes -echo "2/11 Stash all changes" +echo "2/12 Stash all changes" git stash # Pull the latest version of the app -echo "3/11 Pull the latest version of the app" +echo "3/12 Pull the latest version of the app" git pull origin production # Pop the stashed changes -echo "4/11 Pop the stashed changes" +echo "4/12 Pop the stashed changes" git stash pop # Install composer dependencies -echo "5/11 Install composer dependencies" +echo "5/12 Install composer dependencies" /usr/bin/php8.1 /usr/local/bin/composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader # Clear the old cache -echo "6/11 Clear the old cache" +echo "6/12 Clear the old cache" php8.1 artisan clear-compiled # Recreate cache -echo "7/11 Recreate cache" +echo "7/12 Recreate cache" php8.1 artisan optimize # Compile npm assets -echo "8/11 Install npm dependencies" +echo "8/12 Install npm dependencies" npm install --no-progress --prefer-dist # Compile npm assets -echo "9/11 Compile npm assets" +echo "9/12 Compile npm assets" npm run prod # Run database migrations -echo "10/11 Run database migrations" +echo "10/12 Run database migrations" php8.1 artisan migrate --force +# Recreate cache +echo "11/12 Recreate cache" +php8.1 artisan config:cache +php8.1 artisan route:cache +php8.1 artisan event:cache +php8.1 artisan view:cache + # Exit maintenance mode -echo "11/11 Exit maintenance mode" +echo "12/12 Exit maintenance mode" php8.1 artisan up echo "Deployment finished!" diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 33a6ed8..fed5044 100755 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -6,14 +6,14 @@ content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">