Skip to content

Instantly share code, notes, and snippets.

@gentritabazi
Last active April 13, 2021 12:57
Show Gist options
  • Save gentritabazi/f46a17cf04fe6b646ac89aa28df48767 to your computer and use it in GitHub Desktop.
Save gentritabazi/f46a17cf04fe6b646ac89aa28df48767 to your computer and use it in GitHub Desktop.
name: SSH Laravel Deploy
on:
push:
branches: [ master ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: SSH Server Deploy
uses: kostya-ten/ssh-server-deploy@v3
with:
host: {host}
port: {port}
username: {username}
password: {password}
scp_target: ~/{folder...}
after_script: |
cd {folder...}
php artisan down
git fetch -av
git reset --hard origin/master
php artisan clear-compiled
composer install --optimize-autoloader --no-dev
php artisan migrate --force
php artisan route:cache
php artisan config:cache
php artisan event:cache
php artisan view:cache
php artisan up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment