.gitlab-ci.yml 775 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
  - apt --yes update
Christophe Benz's avatar
Christophe Benz committed
5
  - apt --yes install --no-install-recommends calibre rsync
Christophe Benz's avatar
Christophe Benz committed
6
7
  # image node:10 already provides openssh-client

Christophe Benz's avatar
Christophe Benz committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  - npm install gitbook-cli -g

  # 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
22
  variables:
Christophe Benz's avatar
Christophe Benz committed
23
    PDF_FILE: Socle Commun des Données Locales.pdf
Christophe Benz's avatar
Christophe Benz committed
24
  script:
25
    - gitbook install
Christophe Benz's avatar
Christophe Benz committed
26
    - ./build.sh
Christophe Benz's avatar
Christophe Benz committed
27
    - rsync -avz --delete _book/ "$PDF_FILE" validata@dev.validata.fr:validata-doc-html/