Trouble with Shell Runner and copying my React PWA to the working directory

Edit:

Well, I figured out the permissions issue. I had forgotten to recursively update the permissions down the directory. chmod -R g+rxw <dir>/. whoops
But my second question is still valid. Am I even approaching my deploy to staging in a good way?
I have looked around and read many articles, and the documentation, but this is my first real attempt at CI so thoughts are appreciated.

End Edit

Greetings all,
Right down to it. So I have been struggling with ci-cd for a few months now. But I have almost gotten it to where I want it on my staging server, but I have a small problem. After I build the new production optimized build, I move it from the GitLab-runner’s directory to the directory that will be delivering the site out to the world/staging environment for more testing. This is where it fails. it fails with a permissions error, and I believe the runner has permission to write to the directory, but I would really like to know if I am approaching this in the correct manner. Here is my .gitlab-ci.yml file

`stages:

  • build
  • deploy

build:
stage: build
tags:
- Build PWA
script:
- echo “Building Deploy Package”
- npm install
- npm run build
- echo “Build successful”
artifacts:
expire_in: 1 hour
paths:
- build

deploy_production:
stage: deploy
tags:
- Deploy Staging
script:
- echo “Deploying to server”
- cp -rv /home/gitlab-runner/builds/qRT2eXnz/0/AssemblersInc/developers/fubar /home/root1/example/fubar
- echo “Deployed”
environment:
name: staging
url: https://intradev.assemblers.local
only:
- master
`
Any thoughts or ideas would be greatly appreciated.