I am using Laravel Forge and connect it to Envoyer, when I push the codes to bitbucket master branch (that connected to live server) it delete all the users files (such as users profile picture and ...).
I tried .gitignore
in two different format each time:
/public/images/profile/*
#and
/public/images/profile/
but still the users images are deleted.
Any one know how can prevent deletion of the images inside a folder?
With each deploy Envoyer is creating new directory with fresh code from your repository. Your files aren't really deleted, those are still at the server in previous deployment folder.
To solve this, place user files in storage directory. Afterwards go to
Envoyer -> Deployment Hooks -> Manage Linked Folders
and add the following:More details here - https://envoyer.io/docs