diff options
| author | Maxime Dénès | 2019-03-04 13:30:17 +0100 |
|---|---|---|
| committer | Maxime Dénès | 2019-03-04 13:30:17 +0100 |
| commit | b4794c19aef3c076472adabdbf7cc78c89d84b74 (patch) | |
| tree | cf34559f56721abba9b9499b3d35aa44a6881be0 | |
| parent | 913e377f3d24274215bd7d9d37c0189b8b5eb4a6 (diff) | |
| parent | f70820df5f2da589a302dce5d0cd92988c59ccae (diff) | |
Merge PR #9594: When Nix build is finished and pushed to Cachix, update a specific branch.
Ack-by: SkySkimmer
Ack-by: Zimmi48
Reviewed-by: ejgallego
Ack-by: maximedenes
Reviewed-by: vbgl
| -rw-r--r-- | .gitlab-ci.yml | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a1da9be20b..fd1ea325e9 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: @@ -325,6 +336,21 @@ pkg:nix:deploy: - master - /^v.*\..*$/ +pkg:nix:deploy:channel: + <<: *deploy-template + environment: + name: cachix + url: https://coq.cachix.org + only: + variables: + - $CACHIX_DEPLOYMENT_KEY + dependencies: + - pkg:nix:deploy + script: + - echo "$CACHIX_DEPLOYMENT_KEY" | tr -d '\r' | ssh-add - > /dev/null + - git fetch --unshallow + - git push git@github.com:coq/coq-on-cachix "${CI_COMMIT_REF_NAME}" + pkg:nix: <<: *nix-template except: @@ -357,7 +383,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 +394,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 |
