Adjust: Partner dashboard #61
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
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 |