Is it possible in gitlab runner to checkout the repo without .git folder during deployment?

Viewed 90

During deployment using gitlab runner it checkouts out the codebase including the .git folder, I presume this is the default behaviour?

enter image description here

Without manually cleaning the .git folder in our deployment script, is there an option to use git archive instead?

eg.

deploy-dev:
  when: manual
  stage: deploy
  script:
    - bash deploy.sh $CI_COMMIT_REF_SLUG $CI_BUILD_TOKEN
  include-git: false

I have tried searching on google but couldn't find any relevant results (maybe due to bad search keywords)

0 Answers
Related