mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-25 04:45:42 +00:00
Ci publish rustdocs GitHub (#2895)
* ci: publish rustdocs to github repo substrate-developer-hub/rustdocs
This commit is contained in:
committed by
GitHub
parent
4a44a07fd0
commit
faabbb15c1
@@ -313,6 +313,48 @@ publish-s3-doc:
|
|||||||
- aws s3 ls s3://${BUCKET}/${PREFIX}/
|
- aws s3 ls s3://${BUCKET}/${PREFIX}/
|
||||||
--human-readable --summarize
|
--human-readable --summarize
|
||||||
|
|
||||||
|
|
||||||
|
publish-gh-doc:
|
||||||
|
stage: publish
|
||||||
|
image: parity/tools:latest
|
||||||
|
allow_failure: true
|
||||||
|
dependencies:
|
||||||
|
- build-rust-doc-release
|
||||||
|
cache: {}
|
||||||
|
<<: *build-only
|
||||||
|
<<: *kubernetes-build
|
||||||
|
variables:
|
||||||
|
GIT_STRATEGY: none
|
||||||
|
GITHUB_API: "https://api.github.com"
|
||||||
|
script:
|
||||||
|
- test -r ./crate-docs/index.html || (
|
||||||
|
echo "./crate-docs/index.html not present, build:rust:doc:release job not complete";
|
||||||
|
exit 1
|
||||||
|
)
|
||||||
|
- test "${GITHUB_USER}" -a "${GITHUB_EMAIL}" -a "${GITHUB_TOKEN}" || (
|
||||||
|
echo "environment variables for github insufficient";
|
||||||
|
exit 1
|
||||||
|
)
|
||||||
|
- |
|
||||||
|
cat > ${HOME}/.gitconfig <<EOC
|
||||||
|
[user]
|
||||||
|
name = "${GITHUB_USER}"
|
||||||
|
email = "${GITHUB_EMAIL}"
|
||||||
|
|
||||||
|
[url "https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/"]
|
||||||
|
insteadOf = "https://github.com/"
|
||||||
|
EOC
|
||||||
|
- unset GITHUB_TOKEN
|
||||||
|
- git clone https://github.com/substrate-developer-hub/rustdocs.git
|
||||||
|
- rsync -ax --delete ./crate-docs/ ./rustdocs/${CI_COMMIT_REF_NAME}/
|
||||||
|
- cd ./rustdocs; git add .
|
||||||
|
- git commit -m "update rustdoc ${CI_COMMIT_REF_NAME}"
|
||||||
|
- git push origin master 2>&1 | sed -r "s|(${GITHUB_USER}):[a-f0-9]+@|\1:REDACTED@|g"
|
||||||
|
after_script:
|
||||||
|
- rm -vrf ${HOME}/.gitconfig
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.deploy-template: &deploy
|
.deploy-template: &deploy
|
||||||
stage: kubernetes
|
stage: kubernetes
|
||||||
when: manual
|
when: manual
|
||||||
|
|||||||
Reference in New Issue
Block a user