Skip to content

Commit

Permalink
Changed deploy.sh to use default php
Browse files Browse the repository at this point in the history
  • Loading branch information
faab007nl committed Dec 24, 2023
1 parent 3dfbf14 commit 4dad9df
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ echo "-----------------------------------"
# Enter maintenance mode or return true
# if already is in maintenance mode
echo "1/12 Entering maintenance mode"
(php8.2 artisan down) || true
(php artisan down) || true

# Stash all changes
echo "2/12 Stash all changes"
Expand All @@ -23,15 +23,15 @@ git stash pop

# Install composer dependencies
echo "5/12 Install composer dependencies"
/usr/bin/php8.2 /usr/local/bin/composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader
composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader

# Clear the old cache
echo "6/12 Clear the old cache"
php8.2 artisan clear-compiled
php artisan clear-compiled

# Recreate cache
echo "7/12 Recreate cache"
php8.2 artisan optimize
php artisan optimize

# Compile npm assets
echo "8/12 Install npm dependencies"
Expand All @@ -43,17 +43,17 @@ npm run prod

# Run database migrations
echo "10/12 Run database migrations"
php8.2 artisan migrate --force
php artisan migrate --force

# Recreate cache
echo "11/12 Recreate cache"
php8.2 artisan config:cache
php8.2 artisan route:cache
php8.2 artisan event:cache
php8.2 artisan view:cache
php artisan config:cache
php artisan route:cache
php artisan event:cache
php artisan view:cache

# Exit maintenance mode
echo "12/12 Exit maintenance mode"
php8.2 artisan up
php artisan up

echo "Deployment finished!"

0 comments on commit 4dad9df

Please sign in to comment.