Permission when reinitialized existing Git repository

I’m running Ubuntu 14.04 LTS with Gitlab Runnner v12.8.0.

This is my .gitlab-ci.yml

image: docker:latest

  - echo "(!) Starting process"

  - echo "(!) Successfully ran process"

  stage: build
    # - sudo rm -rf ~/.m2/repository/me/pabloestrada/
    - sh lib/credentials/
    - sh lib/guice-quartz/
    - sh lib/persian-jobs/
    - sh persian-services/exercise-tracker/
    - mvn clean package -f service
    - mvn clean package -f scheduler
    - sudo npm install --prefix ui/
    - sudo npm run build --prefix ui/
    - docker-compose build

  stage: deploy
    - docker-compose up

This is my config.toml

concurrent = 1
check_interval = 0

  session_timeout = 1800

  name = "NAME"
  url = "URL"
  token = "TOKEN"
  executor = "shell"

This is my /etc/sudoers

# This file MUST be edited with the 'visudo' command as root.
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
# See the man page for details on how to write a sudoers file.
Defaults	env_reset
Defaults	mail_badpass
Defaults	secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d

gitlab-runner ALL=(ALL) NOPASSWD: ALL

Whenever I run my pipeline, it gets stuck in the build process because it can’t reinitialized existing Git repository:

 Running with gitlab-runner 12.8.0 (1b659122)
   on PersianCI _4pR7ipo
Using Shell executor...
Running on VM...
Fetching changes with git depth set to 50...
 Reinitialized existing Git repository in /home/gitlab-runner/builds/_4pR7ipo/0/pablof300/Project/.git/
 Checking out 7ea332da as master...
 warning: failed to remove ui/build/service-worker.js: Permission denied
 warning: failed to remove ui/build/static/css/ Permission denied
 warning: failed to remove ui/build/static/css/main.2c5be17a.chunk.css: Permission denied
 warning: failed to remove ui/build/static/media/radnika-medium-webfont.352f4137.woff2: Permission denied
 warning: failed to remove ui/build/static/media/radnika-medium-webfont.0474c626.woff: Permission denied
 warning: failed to remove ui/build/static/media/exercise-tracker-service.d7b7664b.png: Permission denied

Does anyone know why it doesn’t have the permissions to do this?