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

before_script:
  - echo "(!) Starting process"

after_script:
  - echo "(!) Successfully ran process"

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

deploy_stage:
  stage: deploy
  script:
    - docker-compose up

This is my config.toml

concurrent = 1
check_interval = 0

[session_server]
  session_timeout = 1800

[[runners]]
  name = "NAME"
  url = "URL"
  token = "TOKEN"
  executor = "shell"
  [runners.custom_build_dir]
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]

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
root	ALL=(ALL:ALL) ALL

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

# Allow members of group sudo to execute any command
%sudo	ALL=(ALL:ALL) ALL

# 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...
00:00
Running on VM...
00:00
Fetching changes with git depth set to 50...
00:00
 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/main.2c5be17a.chunk.css.map: 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?