You should check out Envoy. Really nice way to deploy from local using Git.
https://laravel.com/docs/6.x/envoy
Basically, setup a Git repo... get your code on Github... SSH into your server... generate an SSH key ON YOUR SERVER... add that key to Github... clone your code to your server using:
git clone [email protected] .
Once you've done that just, pull in envoy using composer global require laravel/envoy , create and Envoy.blade.php file and follow the instructions in the docs... mine looks like this... I use ServerPilot / DigitalOcean...
@servers(['localhost' => '127.0.0.1', 'www' => ['[email protected]']])
{{-- envoy run deploy --}}
@task('deploy', ['on' => 'www'])
cd ~/apps/mycode
php artisan down --message="Deploying New Code"
git pull origin master
composer install --optimize-autoloader --no-dev
php artisan config:clear
php artisan config:cache
php artisan route:clear
php artisan route:cache
npm install --production
php artisan migrate --force
php artisan up
@endtask
Once you've done all this, all you have to do is git push to Github then run envoy run deploy locally and it will deploy your code for you.