Skip to content

Commit 9681911

Browse files
committed
Add data:sync to Forge deploy script example
1 parent 7755d46 commit 9681911

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

readme.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ Laravel utility to keep records synced between enviroments through source contro
88
- 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)
99
- Run `php artisan data:sync`
1010

11+
### Optional
12+
If using Laravel Forge, you can have the data sync run automatically on deploy. Edit your deploy script in Site -> App to include:
13+
```
14+
if [ -f artisan ]
15+
then
16+
php artisan data:sync
17+
php artisan migrate --force
18+
fi
19+
```
20+
1121
## Notes
1222
- empty values are skipped
1323
- the criteria/attributes for updateOrCreate are identified with a preleading underscore

0 commit comments

Comments
 (0)