-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
59 lines (45 loc) · 1015 Bytes
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/sh
abort()
{
echo >&2 '
***************
*** ABORTED ***
***************
'
echo "An error occurred. Exiting..." >&2
exit 1
}
trap 'abort' 0
set -e
#----------------------------------------------------------
echo >&2 '
****************************
*** RUNNING DEPLOY TASKS ***
****************************
'
# Pull the latest changes from the git repository
# git reset --hard
# git clean -df
git pull
# Clear config cache
php artisan config:clear
# Install/update composer dependecies
composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev
# Run database migrations
php artisan migrate --force
php artisan migrate --database mysql_es --force
php artisan migrate --database mysql_pt --force
php artisan migrate --database mysql_ja --force
# Clear caches
php artisan cache:clear
# Clear expired password reset tokens
php artisan auth:clear-resets
# Cache config
php artisan config:cache
# Done!
trap : 0
echo >&2 '
*************
*** DONE! ***
*************
'