Parallel docs build ; don't doc deps ; push to docs.xmpp.rs
This commit is contained in:
parent
818a87802f
commit
b42b498a8b
1 changed files with 13 additions and 21 deletions
|
|
@ -3,7 +3,6 @@
|
||||||
stages:
|
stages:
|
||||||
- lint
|
- lint
|
||||||
- test
|
- test
|
||||||
- docs
|
|
||||||
- bot
|
- bot
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
|
|
@ -11,14 +10,9 @@ variables:
|
||||||
FEATURES: ""
|
FEATURES: ""
|
||||||
RUST_BACKTRACE: "full"
|
RUST_BACKTRACE: "full"
|
||||||
|
|
||||||
cache:
|
|
||||||
# Required to keep docs artifacts from old builds
|
|
||||||
paths:
|
|
||||||
- public
|
|
||||||
|
|
||||||
.show-version:
|
.show-version:
|
||||||
before_script:
|
before_script:
|
||||||
- apt-get update; apt-get install -y --no-install-recommends pkg-config libssl-dev libicu-dev
|
- apt-get update; apt-get install -y --no-install-recommends pkg-config libssl-dev
|
||||||
- rustc --version
|
- rustc --version
|
||||||
- cargo --version
|
- cargo --version
|
||||||
|
|
||||||
|
|
@ -46,25 +40,23 @@ cache:
|
||||||
- if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_REF_NAME == 'main'
|
- if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_REF_NAME == 'main'
|
||||||
|
|
||||||
.docs:
|
.docs:
|
||||||
stage: docs
|
stage: test
|
||||||
script:
|
script:
|
||||||
- echo "Building docs to CI_DOC_TARGET=$CI_DOC_TARGET"
|
- echo "Building docs to CI_DOC_TARGET=$CI_DOC_TARGET"
|
||||||
- cargo doc
|
- cargo +nightly doc --no-deps -Zrustdoc-map
|
||||||
- rm -rf "$CI_DOC_TARGET"
|
- apt install -y rsync openssh-client
|
||||||
- mkdir -p "$(dirname "$CI_DOC_TARGET")"
|
- mkdir -p $HOME/.ssh
|
||||||
- mv target/doc "$CI_DOC_TARGET"
|
- echo -e "Host docs\n\tHostname docs.xmpp.rs\n\tPort 1312\n\tUser xmpp-rs\n\tStrictHostKeyChecking no" > $HOME/.ssh/config
|
||||||
- echo "<a href='jid'>jid</a><br><a href='minidom'>minidom</a><br><a href='sasl'>sasl</a><br><a href='tokio_xmpp'>tokio_xmpp</a><br><a href='xmpp'>xmpp</a><br><a href='xmpp_parsers'>xmpp_parsers</a>" > "$CI_DOC_TARGET"/index.html
|
- echo "$SECRET_DOCS_SSH_PRIVATE" > $HOME/.ssh/id_ed25519
|
||||||
artifacts:
|
- chmod 400 $HOME/.ssh/id_ed25519
|
||||||
name: "$CI_DOC_TARGET"
|
- rsync -av target/doc/ docs:$CI_DOC_TARGET
|
||||||
paths:
|
|
||||||
- public
|
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||||
variables:
|
variables:
|
||||||
CI_DOC_TARGET: "public/$CI_MERGE_REQUEST_IID"
|
CI_DOC_TARGET: "$CI_MERGE_REQUEST_IID"
|
||||||
- if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_REF_NAME == 'main'
|
- if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_REF_NAME == 'main'
|
||||||
variables:
|
variables:
|
||||||
CI_DOC_TARGET: "public/main"
|
CI_DOC_TARGET: "main"
|
||||||
|
|
||||||
rustfmt:
|
rustfmt:
|
||||||
stage: lint
|
stage: lint
|
||||||
|
|
@ -87,10 +79,10 @@ nightly-test:
|
||||||
- .test
|
- .test
|
||||||
- .nightly
|
- .nightly
|
||||||
|
|
||||||
pages:
|
docs:
|
||||||
extends:
|
extends:
|
||||||
- .docs
|
- .docs
|
||||||
- .stable
|
- .nightly
|
||||||
|
|
||||||
bot-comment:
|
bot-comment:
|
||||||
stage: bot
|
stage: bot
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue