title: Gitlab-runner deletes files on remote, despite .gitignore
body: <p>I tried to find a solution for this problem but couldn't find any.</p>
  
  <p>The issue:</p>
  
  <p>We have image files in <code>/public/img/InfoNews/example.png</code> and every time we push an update gitlab-runner removes those files on the remote.</p>
  
  <p>We have <code>/public/img/InfoNews</code> in our <code>.gitignore</code> this prevents git from uploading local files but not from deleting remote files in that folder for some reason.</p>
  
  <p>I tried to add this path to the cache and artifacts in <code>.gitlab-ci.yml</code> without success</p>
  
  <p>A push in the right direction is appreciated.</p>
  
  <p>Our <code>.gitlab-ci.yml</code>:</p>
  
  <pre><code>cache:
    paths:
      - vendor/
      - public/img/
  
  deploy:
    stage: deploy
    script:
      - php artisan cache:clear
      - rm -rf vendor/
      - composer install
      - echo "$env" &gt; "$(pwd)/.env"
      - php artisan migrate
  
    artifacts:
      paths:
        - .env
        - public/img/
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>I also tried </p>
  
  <pre><code>cache:
    untracked: true
    paths:
      - vendor/
      - public/img/
  </code></pre>
  
  <p>But it still deletes the files.</p>