.gitlab-ci.yml 649 Bytes
Newer Older
Christophe Benz's avatar
Christophe Benz committed
1
image: jailbreakparis/validata-doc:latest
Christophe Benz's avatar
Christophe Benz committed
2

Christophe Benz's avatar
fixup!  
Christophe Benz committed
3 4 5
variables:
  PDF_FILE: Socle Commun des Données Locales.pdf

6
build_gitbook:
Christophe Benz's avatar
Christophe Benz committed
7
  stage: build
8 9 10 11 12
  script:
    - ./build.sh
  artifacts:
    paths:
      - _book/
Christophe Benz's avatar
fixup!  
Christophe Benz committed
13
      - "$PDF_FILE"
14 15 16 17 18 19 20 21 22 23 24

deploy_gitbook:
  stage: deploy
  only:
    - master
  before_script:
    # Load SSH agent
    - eval $(ssh-agent -s)
    - ssh-add <(echo "$SSH_PRIVATE_KEY")
    - mkdir -p ~/.ssh
    - ssh-keyscan -t rsa go.validata.fr >> ~/.ssh/known_hosts
Christophe Benz's avatar
Christophe Benz committed
25
  script:
Christophe Benz's avatar
Christophe Benz committed
26
    - rsync -avz --delete _book/ "$PDF_FILE" validata@go.validata.fr:validata-doc-html/
27 28 29
  environment:
    name: documentation
    url: https://scdl.opendatafrance.net/docs/