Unverified Commit fe9f0a94 authored by Denis_P's avatar Denis_P 👙 Committed by GitHub

Fine tuning for docs job (#322)

* test run

* debug gitlab

* debug gitlab 2

* debug gitlab 3

* typo

* wanna delete everything

* should be enough to invalidate the repo

* not sure if it can fetch

* there was jekyll config!

* typo

* checkout to github must work here

* check status

* rebase [skip ci]

* ready [skip ci]
parent 5ca6a74f
Pipeline #79446 skipped
......@@ -219,22 +219,27 @@ publish-docs:
script:
- rm -rf /tmp/*
- unset CARGO_TARGET_DIR
# Set github
- git config --global user.email "devops-team@parity.io"
- git config --global user.name "${GITHUB_USER}"
# Set git config
- rm .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/ink.git"
- git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
- git fetch origin gh-pages
# Generating Docs
- time cargo doc --release --no-deps --all --verbose
# saving README and docs
- mv target/doc/ /tmp/
- cp README.md /tmp/doc/
# on gh-pages branch the contents of target/doc should be in root dir
- git checkout -b gh-pages || git checkout gh-pages
- git checkout gh-pages
- mv _config.yml /tmp/doc/
# remove everything and restore generated docs, README and Jekyll config
- rm -vrf ./*
- rm -rf ./*
- mv /tmp/doc/* .
# Upload files
- git add --all --force
- git status
- git commit -m "Updated docs for ${CI_COMMIT_REF_NAME} and pushed to gh-pages"
- git push origin gh-pages --force
after_script:
- rm -rf .git/ ./*
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