-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (31 loc) · 930 Bytes
/
main.yml
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
name: Deploy app
on:
push:
branches:
- main
jobs:
Deploy:
runs-on: self-hosted
steps:
- name: Deploying app
run: |
cd /home/laravel/project
if [ -d "./T-Caps" ]; then
cd ./T-Caps
git pull
else
git clone https://github.com/HE-Arc/T-Caps.git
cd ./T-Caps
fi
composer install --optimize-autoloader --no-dev
npm install
cp ../.env .env
sudo php artisan key:generate --force
sudo php artisan migrate --force
sudo php artisan storage:link
sudo php artisan config:cache
sudo php artisan route:cache
sudo php artisan view:cache
sudo chown -R www-data:www-data /home/laravel/project/T-Caps/storage
sudo chown -R www-data:www-data /home/laravel/project/T-Caps/public/source/media
npm run build