stages:
  - makedoc
  - deploydoc
  - build

job1:
  stage: makedoc
  script: mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=Release ../; make docs; cp doc/libRaptorQ-RFC6330.pdf ~/
  

job2:
  stage: deploydoc
  script: git diff-tree --no-commit-id --name-only -r HEAD | grep ^doc/ || exit 0; cd /var/lib/gitlab-runner/libRaptorQ.wiki; git pull; cp ~/libRaptorQ-RFC6330.pdf .; git add libRaptorQ-RFC6330.pdf; git commit -m '(gitlab-runner) updated pdf'; git push;

job3:
  stage: build
  script: mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=Release ../; make everything;

