GitHub Actions - Deploy PasteText
27. GitHub Actions - Deploy PasteText
====================================
name: Deploy PasteText
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with: { php-version: '8.2' }
- name: Composer install
run: composer install --no-dev --optimize-autoloader
- name: Deploy to server
uses: appleboy/[email protected]
with:
host: ${{ secrets.SERVER_IP }}
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SSH_KEY }}
script: |
cd /var/www/pastetext
git pull origin main
composer install --no-dev
php artisan migrate --force
systemctl restart nginx php8.2-fpm
Featured
Advertisement
Category
Action