From 2ee203d41839ee15b594db6cb5de8ed2855757c9 Mon Sep 17 00:00:00 2001 From: Alexander Samusev <41779041+alvicsam@users.noreply.github.com> Date: Tue, 23 Nov 2021 18:36:53 +0100 Subject: [PATCH] Add ssh token for publishing gh-pages (#1031) * Added ssh token for publishing gh-pages * fix ssh commands for publish-docs --- .gitlab-ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aa13268759e..491f3a6f9e3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -103,6 +103,9 @@ workflow: PIPELINE_TOKEN: vault: cicd/gitlab/$CI_PROJECT_PATH/PIPELINE_TOKEN@kv file: false + GITHUB_SSH_PRIV_KEY: + vault: cicd/gitlab/$CI_PROJECT_PATH/GITHUB_SSH_PRIV_KEY@kv + file: true #### stage: check @@ -444,10 +447,10 @@ publish-docs: script: - rm -rf /tmp/* # Set git config - - rm -rf .git/config + - git config core.sshCommand "ssh -i ${GITHUB_SSH_PRIV_KEY} -F /dev/null -o StrictHostKeyChecking=no" - git config user.email "devops-team@parity.io" - git config user.name "${GITHUB_USER}" - - git config remote.origin.url "https://${GITHUB_TOKEN}@github.com/paritytech/ink.git" + - git config remote.origin.url "git@github.com:/paritytech/${CI_PROJECT_NAME}.git" - git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" - git fetch origin gh-pages # saving README and docs