.gitlab-ci.yml 693 Bytes
Newer Older
Christophe Benz's avatar
Christophe Benz committed
1
2
3
image: node:10

before_script:
Christophe Benz's avatar
Christophe Benz committed
4
5
6
7
  - apt --yes update
  - apt --yes install --no-install-recommends rsync
  # image node:10 already provides openssh-client

Christophe Benz's avatar
Christophe Benz committed
8
9
  - npm install gitbook-cli -g

Christophe Benz's avatar
Christophe Benz committed
10

Christophe Benz's avatar
Christophe Benz committed
11
12
13
14
15
16
17
18
19
20
21
22
23
  # Run ssh-agent (inside the build environment).
  - eval $(ssh-agent -s)

  # Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store.
  - ssh-add <(echo "$SSH_PRIVATE_KEY")

  # Add the SSH keys of remote Git servers, to disable host key checking questions.
  - mkdir -p ~/.ssh
  - ssh-keyscan -t rsa dev.validata.fr >> ~/.ssh/known_hosts

job:
  stage: build
  script:
24
    - gitbook install
Christophe Benz's avatar
Christophe Benz committed
25
    - gitbook build
Christophe Benz's avatar
Christophe Benz committed
26
    - rsync -avz --delete _book/ validata@dev.validata.fr:validata-doc-html/