aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Laporte2019-02-28 09:44:28 +0000
committerVincent Laporte2019-02-28 09:48:51 +0000
commit8e83893e23131eb659780a116134996e430ead87 (patch)
tree0f0700686f02450dac40172292fb6a365e9216d6
parent53bafd5df5b025d8b168cb73a8bb44115ca504fa (diff)
[Gitlab-CI] Creates a deploy-template
To be used when pushing an artifact to a github repository
-rw-r--r--.gitlab-ci.yml21
1 files changed, 12 insertions, 9 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a1da9be20b..b745b1be5c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -209,6 +209,17 @@ after_script:
variables:
- $WINDOWS =~ /enabled/
+.deploy-template: &deploy-template
+ stage: deploy
+ before_script:
+ - which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )
+ - eval $(ssh-agent -s)
+ - mkdir -p ~/.ssh
+ - chmod 700 ~/.ssh
+ - ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
+ - git config --global user.name "coqbot"
+ - git config --global user.email "coqbot@users.noreply.github.com"
+
build:base:
<<: *build-template
variables:
@@ -357,7 +368,7 @@ doc:stdlib:dune:
- _build/default/doc/stdlib/html
doc:refman:deploy:
- stage: deploy
+ <<: *deploy-template
environment:
name: deployment
url: https://coq.github.io/
@@ -368,14 +379,6 @@ doc:refman:deploy:
- doc:ml-api:odoc
- doc:refman:dune
- doc:stdlib:dune
- before_script:
- - which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )
- - eval $(ssh-agent -s)
- - mkdir -p ~/.ssh
- - chmod 700 ~/.ssh
- - ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
- - git config --global user.name "coqbot"
- - git config --global user.email "coqbot@users.noreply.github.com"
script:
- echo "$DOCUMENTATION_DEPLOY_KEY" | tr -d '\r' | ssh-add - > /dev/null
- git clone git@github.com:coq/doc.git _deploy