From 968191127df217fb155c31665314fad972a57a97 Mon Sep 17 00:00:00 2001 From: distinctm Date: Thu, 24 Jan 2019 16:06:43 -0500 Subject: [PATCH] Add data:sync to Forge deploy script example --- readme.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/readme.md b/readme.md index d5ee863..39e1112 100644 --- a/readme.md +++ b/readme.md @@ -8,6 +8,16 @@ Laravel utility to keep records synced between enviroments through source contro - Run `php artisan vendor:publish --provider="distinctm\LaravelDataSync\DataSyncBaseServiceProvider" --tag="data-sync-config"` to publish config file. Specify directory for sync data files (default is a new sync directory in the project root) - Run `php artisan data:sync` +### Optional +If using Laravel Forge, you can have the data sync run automatically on deploy. Edit your deploy script in Site -> App to include: +``` +if [ -f artisan ] +then + php artisan data:sync + php artisan migrate --force +fi +``` + ## Notes - empty values are skipped - the criteria/attributes for updateOrCreate are identified with a preleading underscore