Unverified Commit 6da31d09 authored by Alexander Samusev's avatar Alexander Samusev Committed by GitHub
Browse files

[ci] Add ssh token for publishing gh-pages (#4347)

* [ci] Added ssh token for publishing gh-pages

* returned github_token

* fix ssh commands for publish-rustdoc

* fix ssh command for publish-docs

* Fix publish-rustdoc, remove clear /tmp
parent f6b62504
Pipeline #167931 canceled with stages
in 48 seconds
......@@ -107,14 +107,17 @@ default:
GITHUB_PR_TOKEN:
vault: cicd/gitlab/parity/GITHUB_PR_TOKEN@kv
file: false
GITHUB_TOKEN:
vault: cicd/gitlab/parity/GITHUB_TOKEN@kv
file: false
GITHUB_USER:
vault: cicd/gitlab/$CI_PROJECT_PATH/GITHUB_USER@kv
file: false
GITHUB_RELEASE_TOKEN:
vault: cicd/gitlab/$CI_PROJECT_PATH/GITHUB_RELEASE_TOKEN@kv
file: false
GITHUB_TOKEN:
vault: cicd/gitlab/$CI_PROJECT_PATH/GITHUB_TOKEN@kv
GITHUB_SSH_PRIV_KEY:
vault: cicd/gitlab/$CI_PROJECT_PATH/GITHUB_SSH_PRIV_KEY@kv
file: false
MATRIX_ACCESS_TOKEN:
vault: cicd/gitlab/$CI_PROJECT_PATH/MATRIX_ACCESS_TOKEN@kv
......@@ -554,12 +557,15 @@ publish-rustdoc:
- job: build-rustdoc
artifacts: true
script:
- rm -rf /tmp/*
# setup ssh
- eval $(ssh-agent)
- ssh-add - <<< ${GITHUB_SSH_PRIV_KEY}
- mkdir ~/.ssh && touch ~/.ssh/known_hosts
- ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
# Set git config
- rm -rf .git/config
- 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/polkadot.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
# Save README and 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