Merge branch 'patch-5' into 'manual18.05.x'
[kohadocs.git] / .gitlab-ci.yml
1 cache:
2   paths:
3     - build/
4
5 before_script:
6   # Install ssh-agent if not already installed, it is required by Docker.
7   # (change apt-get to yum if you use a CentOS-based image)
8   - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
9
10   # Run ssh-agent (inside the build environment)
11   - eval $(ssh-agent -s)
12
13   # Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
14   - ssh-add <(echo "$ssh_key")
15
16   # For Docker builds disable host key checking. Be aware that by adding that
17   # you are suspectible to man-in-the-middle attacks.
18   # WARNING: Use this only with the Docker executor, if you use it with shell
19   # you will overwrite your user's SSH config.
20   - mkdir -p ~/.ssh
21   - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
22   # In order to properly check the server's host key, assuming you created the
23   # SSH_SERVER_HOSTKEYS variable previously, uncomment the following two lines
24   # instead.
25   # - mkdir -p ~/.ssh
26   # - '[[ -f /.dockerenv ]] && echo "$SSH_SERVER_HOSTKEYS" > ~/.ssh/known_hosts'
27
28
29 image: debian:unstable
30
31 #test:
32 #  stage: test
33 #  script:
34 #  - apt-get update
35 #  - DEBIAN_FRONTEND=noninteractive apt-get install -y python3-sphinx  python3-sphinxcontrib.spelling make
36 #  - for l in `ls locales` ; do make -e SPHINXOPTS="-D language='$l'" BUILDDIR="build/$l" html ; make -e SPHINXOPTS="-D language='$l'" BUILDDIR="build/$l" epub ; done
37 #  only:
38 #  - master
39
40 production:
41     stage: deploy
42     script:
43     - DEBIAN_FRONTEND=noninteractive apt-get install -y python3-sphinx  python3-sphinxcontrib.spelling make rsync
44     - make all_epub # build/LANG/epub
45     - make all_html # build/LANG/html
46     - rsync -c -u -r -e "ssh" --progress build/* chrisc@www.koha-community.org:/var/www/manual/18.05/
47     only:
48         - master
49     environment: production