-
-
Save hassanalami/80141bacff6d671d973e73a593c90aac to your computer and use it in GitHub Desktop.
Laravel deploy script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change to the project directory | |
cd /home/forge/domain.com | |
# Turn on maintenance mode | |
php artisan down || true | |
# Pull the latest changes from the git repository | |
# git reset --hard | |
# git clean -df | |
git pull origin master | |
# Install/update composer dependecies | |
composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev --no-scripts | |
# Run database migrations | |
php artisan migrate --force | |
# Clear caches | |
php artisan cache:clear | |
# Clear expired password reset tokens | |
php artisan auth:clear-resets | |
# Clear and cache routes | |
php artisan route:cache | |
# Clear and cache config | |
php artisan config:cache | |
# Clear and cache views | |
php artisan view:cache | |
# Install node modules | |
# npm ci | |
# Build assets using Laravel Mix | |
# npm run production | |
# Turn off maintenance mode | |
php artisan up |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment