NOOB questions: Deployment Path & Testing a specific file changed

We have a very simply need, running Python scripts to do some data wrangling. Each python file is a different data source and is independent except for one library file which contains common functions. We are using gitlab for version control on the scripts. I have started playing with CI/CD and have it deploying a staging environment on a targeted windows server using the runner.

At the moment, the git clone is being deployed onto a subfolder of the runner on the server. I would like to have the staging environment going to a specific folder e.g. ‘e:\reporting.stage’ and the production environment going to ‘e:\reporting’. I can’t see how to set the destination folder… is it possible?

Second, if we change a single script, is it possible to pass a variable that is the script name so we only test that one file change? Or do we need to test every single script every time? FYI, my current config is manually pointing to a single script just until I get CI/CD working.

Here is my current config:

`
stages:

  • test
  • deploy

before_script:
- cd /reporting.stage

test:
stage: test
environment:
name: staging
script:
- copy \reporting\optics\python\config.yml e:\reporting.stage\python
- python “python\other\ratecard.py”

deploy:
stage: deploy
script:
- echo “Running deploy”
environment:
name: production
when: manual
only:
- master
`