-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
|
||
main() { | ||
# Getting last version | ||
git pull | ||
|
||
# Shutdown the laravel app | ||
php artisan down | ||
|
||
# Install new composer packages | ||
composer install --no-dev --prefer-dist --optimize-autoloader | ||
|
||
# Cache boost configuration and routes | ||
php artisan cache:clear | ||
php artisan config:cache | ||
php artisan route:cache | ||
php artisan queue:restart | ||
|
||
# Sync database changes | ||
if [ "$1" == "migrate" ] | ||
then | ||
php artisan migrate | ||
fi | ||
|
||
# Rise from the ashes | ||
php artisan up | ||
|
||
echo '' | ||
echo '🔥 Deploy finished 🔥' | ||
echo '' | ||
} | ||
|
||
main $1 |