Skip to content

Instantly share code, notes, and snippets.

@sahibalejandro
Last active January 8, 2024 17:48
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save sahibalejandro/a1e74014a08c3073c4aa to your computer and use it in GitHub Desktop.
Save sahibalejandro/a1e74014a08c3073c4aa to your computer and use it in GitHub Desktop.
Deploy script for Laravel projects.
# Shutdown the laravel app
php artisan down
# Install new composer packages
composer install --no-dev --prefer-dist
# Cache boost configuration and routes
php artisan cache:clear
php artisan config:cache
php artisan route:cache
# Sync database changes
php artisan migrate
# Install new node modules
npm install
# Build assets when using Laravel Elixir
#gulp --production
# Build assets when using Laravel Mix
#npm run production
# Rise from the ashes
php artisan up
echo 'Deploy finished.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment