We have image files in
/public/img/InfoNews/example.png, those files are not part of the repo and every time we push an update gitlab-runner removes those files on the remote.
/public/img/InfoNews in our
.gitignore this prevents git from uploading local files but not from deleting remote files in that folder for some reason.
I tried to add this path to the cache in
.gitlab-ci.yml without success
A push in the right direction is appreciated.
cache: paths: - vendor/ - public/img/ deploy: stage: deploy script: - php artisan cache:clear - rm -rf vendor/ - composer install - echo "$env" > "$(pwd)/.env" - php artisan migrate
I also tried
cache: untracked: true paths: - vendor/ - public/img/
But it still deletes the files.