1

My pipeline is successfully building the artefacts but I have no idea (and to be honest as the more I read the more I am confused) how to deploy to the directory on my server

I completely do not understand what to do to simply copy artifacts to the directory on my server.

image: gul-doxygen:latest

stages:
  - pages
  - deploy

pages:
  stage: pages
  script:
    - echo "executing the doxygen"
    - doxygen ./Doxyfile
    - apt update
    - apt install tree
    - tree -d
    - mv --verbose documentation/html/ public/  
  artifacts:
    paths:
      - public
  only:
    - DOXYGEN-MASTER 

deploy: 
  stage: deploy
  dependencies:
    - pages
  script:
    - echo "Hello world"

What should I put in the script part?

1 Answer 1

0

From what it looks like, you are storing your build in the public directory using artifacts. To deploy, you simply need to copy these binaries from this directory to the directory of your server.

To do this, microsoft has a built in robocopy command. Here is the documentation https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy.

Here is an example cmd script:

SET server=<ip_address_here>

robocopy <source> <destination> [<file>[ ...]] [<options>]

PAUSE
Sign up to request clarification or add additional context in comments.

4 Comments

this directory does not exists. (it is not visible on the server).
@0___________ Ideally, you want your gitlab runner and other resources to be on a VM on the server, that way it can easily access any necessary files. Consider restructuring as such.
@0___________ See medium.com/@gabriel.faraday.barros/…. there is a useful sample code on deploying at the end.
It is not what I am lloking for

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.