Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Prev Previous commit
Next Next commit
debug publish
  • Loading branch information
alvicsam committed Jul 22, 2022
commit c4bc61e92280f9df392014cc528a49c9f22fd959
60 changes: 31 additions & 29 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -876,35 +876,37 @@ publish-rustdoc:
- job: build-implementers-guide
artifacts: true
script:
# 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
- git config user.email "[email protected]"
- git config user.name "${GITHUB_USER}"
- git config remote.origin.url "[email protected]:/paritytech/${CI_PROJECT_NAME}.git"
- git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
- git fetch origin gh-pages
# Save README and docs
- cp -r ./crate-docs/ /tmp/doc/
- cp ./README.md /tmp/doc/
- git checkout gh-pages
# Remove everything and restore generated docs and README
- rm -rf ./*
- mv /tmp/doc/* .
# Upload files
- git add --all --force
# `git commit` has an exit code of > 0 if there is nothing to commit.
# This causes GitLab to exit immediately and marks this job failed.
# We don't want to mark the entire job failed if there's nothing to
# publish though, hence the `|| true`.
- git commit -m "Updated docs for ${CI_COMMIT_REF_NAME}" ||
echo "___Nothing to commit___"
- git push origin gh-pages --force
- echo "___Rustdoc was successfully published to https://paritytech.github.io/polkadot/___"
after_script:
- ls -la artifacts/
- ls -la crate-docs/
# # 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
# - git config user.email "[email protected]"
# - git config user.name "${GITHUB_USER}"
# - git config remote.origin.url "[email protected]:/paritytech/${CI_PROJECT_NAME}.git"
# - git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
# - git fetch origin gh-pages
# # Save README and docs
# - cp -r ./crate-docs/ /tmp/doc/
# - cp ./README.md /tmp/doc/
# - git checkout gh-pages
# # Remove everything and restore generated docs and README
# - rm -rf ./*
# - mv /tmp/doc/* .
# # Upload files
# - git add --all --force
# # `git commit` has an exit code of > 0 if there is nothing to commit.
# # This causes GitLab to exit immediately and marks this job failed.
# # We don't want to mark the entire job failed if there's nothing to
# # publish though, hence the `|| true`.
# - git commit -m "Updated docs for ${CI_COMMIT_REF_NAME}" ||
# echo "___Nothing to commit___"
# - git push origin gh-pages --force
# - echo "___Rustdoc was successfully published to https://paritytech.github.io/polkadot/___"
# after_script:
- rm -rf .git/ ./*

# # Run all pallet benchmarks only once to check if there are any errors
Expand Down