Commit de61d74f authored by Christophe Benz's avatar Christophe Benz
Browse files

Enhance pipeline: separate build from deploy, create artifact

parent 67eb7b14
Pipeline #692 failed with stages
in 1 minute and 1 second
image: jailbreakparis/validata-doc:latest
before_script:
# 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 go.validata.fr >> ~/.ssh/known_hosts
job:
build_gitbook:
stage: build
script:
- ./build.sh
artifacts:
paths:
- _book/
deploy_gitbook:
stage: deploy
only:
- master
variables:
PDF_FILE: Socle Commun des Données Locales.pdf
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
script:
- ./build.sh
- rsync -avz --delete _book/ "$PDF_FILE" validata@go.validata.fr:validata-doc-html/
environment:
name: documentation
url: https://scdl.opendatafrance.net/docs/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment