-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (30 loc) · 860 Bytes
/
deploy.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
35
name: Deploy Laravel to VM
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 'latest'
- name: Run deployment script via SSH
uses: appleboy/[email protected]
with:
host: ${{ secrets.VM_HOST }}
username: ${{ secrets.VM_USER }}
password: ${{ secrets.VM_PASSWORD }}
script: |
cd /var/www/csr-smkdev-league
sudo -u www-data git pull origin main
sudo -u www-data composer install --no-interaction --prefer-dist --optimize-autoloader
BUN=$(which bun)
$BUN install
$BUN run build
sudo -u www-data php artisan optimize
sudo service nginx restart