Skip to content

Commit

Permalink
[ci] Publish implementers guide (#1615)
Browse files Browse the repository at this point in the history
PR adds a job that publishes implementers guide

cc #1614
cc paritytech/ci_cd#879
  • Loading branch information
alvicsam authored Sep 18, 2023
1 parent 8900d5b commit e6f5e23
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitlab/pipeline/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ build-implementers-guide:
- .kubernetes-env
- .common-refs
- .run-immediately
# - .collect-artifacts
- .collect-artifacts
# git depth is set on purpose: https://github.com/paritytech/polkadot/issues/6284
variables:
GIT_STRATEGY: clone
Expand Down
12 changes: 10 additions & 2 deletions .gitlab/pipeline/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ publish-rustdoc:
needs:
- job: build-rustdoc
artifacts: true
- job: build-implementers-guide
artifacts: true
script:
# If $CI_COMMIT_REF_NAME doesn't match one of $RUSTDOCS_DEPLOY_REFS space-separated values, we
# exit immediately.
Expand All @@ -34,15 +36,21 @@ publish-rustdoc:
- git fetch origin gh-pages
# Save README and docs
- cp -r ./crate-docs/ /tmp/doc/
- cp -r ./artifacts/book/ /tmp/
- cp README.md /tmp/doc/
# we don't need to commit changes because we copy docs to /tmp
- git checkout gh-pages --force
# Enable if docs needed for other refs
# Install `index-tpl-crud` and generate index.html based on RUSTDOCS_DEPLOY_REFS
- which index-tpl-crud &> /dev/null || yarn global add @substrate/index-tpl-crud
- index-tpl-crud upsert ./index.html ${CI_COMMIT_REF_NAME}
# - which index-tpl-crud &> /dev/null || yarn global add @substrate/index-tpl-crud
# - index-tpl-crud upsert ./index.html ${CI_COMMIT_REF_NAME}
# Ensure the destination dir doesn't exist.
- rm -rf ${CI_COMMIT_REF_NAME}
- rm -rf book/
- mv -f /tmp/doc ${CI_COMMIT_REF_NAME}
# dir for implementors guide
- mkdir -p book
- mv /tmp/book/html/* book/
# Upload files
- git add --all
# `git commit` has an exit code of > 0 if there is nothing to commit.
Expand Down

0 comments on commit e6f5e23

Please sign in to comment.