diff options
| author | Vincent Laporte | 2019-02-28 09:44:28 +0000 |
|---|---|---|
| committer | Vincent Laporte | 2019-02-28 09:48:51 +0000 |
| commit | 8e83893e23131eb659780a116134996e430ead87 (patch) | |
| tree | 0f0700686f02450dac40172292fb6a365e9216d6 | |
| parent | 53bafd5df5b025d8b168cb73a8bb44115ca504fa (diff) | |
[Gitlab-CI] Creates a deploy-template
To be used when pushing an artifact to a github repository
| -rw-r--r-- | .gitlab-ci.yml | 21 |
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 |
