]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - .gitlab-ci.yml
CI: publish doxygen to github pages
[xonotic/xonotic-data.pk3dir.git] / .gitlab-ci.yml
1 before_script:
2   - git clone --depth=1 --branch=master https://gitlab.com/xonotic/darkplaces.git darkplaces
3   - cd darkplaces && make sv-debug -j $(nproc)
4   - cd ..
5   - export ENGINE="$PWD/darkplaces/darkplaces-dedicated -xonotic"
6
7   - git clone --depth=1 --branch=master https://gitlab.com/xonotic/gmqcc.git gmqcc
8   - cd gmqcc && make -j $(nproc)
9   - cd ..
10   - export QCC="$PWD/gmqcc/gmqcc"
11
12   - ln -s $PWD data/xonotic-data.pk3dir
13   - mkdir maps && wget -O maps/gitlab-ci.bsp https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/_init/_init.bsp
14
15 build:
16   script:
17     - make
18     - while read line; do
19         echo $line;
20         if [[ $line == "All tests OK" ]]; then exit 0; fi;
21       done < <(${ENGINE} +developer 1 +map gitlab-ci +sv_cmd runtest +exit)
22     - exit 1
23
24 doxygen:  # rename to 'pages' when gitlab.com allows pages to exceed 100MiB
25   stage: deploy
26   script:
27     - cd qcsrc && doxygen
28     - mv html ../public
29     - for i in {0..0}; do eval $(printf "echo \$id_rsa_%02d\n" $i) >> ~/.ssh/id_rsa_base64; done
30     - base64 --decode ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
31     - chmod 600 ~/.ssh/id_rsa
32     - echo -e "Host *\n\tStrictHostKeyChecking no\n\tLogLevel ERROR\n" >> ~/.ssh/config
33     - git config --global user.name "Gitlab CI"
34     - git config --global user.email "<>"
35     - git clone --single-branch --depth 1 ${DEPLOY_HOST}:${DEPLOY_REPO} ~/deploy_
36     - mkdir ~/deploy && mv ~/deploy_/.git ~/deploy && rm -r ~/deploy_
37     - cp -r ../public/* ~/deploy
38     - cd ~/deploy && git add -A . && git commit -m "Update" && git push origin gh-pages
39   artifacts:
40     paths:
41       - public
42   only:
43     - master