Commit 6fd834d0 authored by Denis_P's avatar Denis_P 🤸 Committed by GitHub

Docs Generation (#310)

* test gen docs

* test gen docs; edit the commit

* fix target dir

* fix checkout

* checkout fqa

* checkout fqa 2

* use gh repo

* typo

* debug

* debug2

* remotes

* checkout and reset

* typo

* symbolic hack for git 'outside of directory'

* fix gh address

* force

* no force, unprotected

* real branch

* debug

* and now force

* cleanup

* cleanup

* switch to the gh-pages branch no matter what

* small fix

* ready to merge
parent 9f8cffe7
Pipeline #76852 passed with stages
in 13 minutes and 2 seconds
......@@ -9,6 +9,7 @@ stages:
- check
- workspace
- examples
- publish
variables:
GIT_STRATEGY: fetch
......@@ -195,3 +196,28 @@ examples-generate-metadata:
cargo contract generate-metadata &&
popd;
done
#### stage: publish
publish-docs:
stage: publish
<<: *docker-env
only:
- master
- schedules
- tags
script:
# Set github
- git config --global user.email "devops-team@parity.io"
- git config --global user.name "${GITHUB_USER}"
- git config remote.origin.url "https://${GITHUB_TOKEN}@github.com/paritytech/ink.git"
# Generating Docs
- cargo doc --no-deps --all
- git checkout -b gh-pages || git checkout gh-pages
# Symbolic link because these files live in cache
- mkdir -p target/doc
- ln -s "${CARGO_TARGET_DIR}"/doc/ target/doc/
# Upload files
- git add -f target/doc/
- git commit -m "Update docs to ${CI_COMMIT_REF_NAME}"
- git push origin gh-pages --force
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