publish docs on GH pages
This commit is contained in:
@@ -2,6 +2,10 @@ language: rust
|
|||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
- env: TARGET=x86_64-unknown-linux-gnu
|
||||||
|
rust: nightly
|
||||||
|
if: branch = master AND type != pull_request
|
||||||
|
|
||||||
- env: TARGET=thumbv6m-none-eabi
|
- env: TARGET=thumbv6m-none-eabi
|
||||||
rust: nightly
|
rust: nightly
|
||||||
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
|
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
|
||||||
@@ -26,6 +30,9 @@ install:
|
|||||||
script:
|
script:
|
||||||
- bash ci/script.sh
|
- bash ci/script.sh
|
||||||
|
|
||||||
|
after_success:
|
||||||
|
- bash ci/after-success.sh
|
||||||
|
|
||||||
after_script: set +e
|
after_script: set +e
|
||||||
|
|
||||||
cache: cargo
|
cache: cargo
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
authors = ["Jorge Aparicio <jorge@japaric.io>"]
|
authors = ["Jorge Aparicio <jorge@japaric.io>"]
|
||||||
categories = ["embedded", "no-std"]
|
categories = ["embedded", "no-std"]
|
||||||
description = "A template for building applications for ARM Cortex-M microcontrollers"
|
description = "A template for building applications for ARM Cortex-M microcontrollers"
|
||||||
|
documentation = "https://rust-embedded.github.io/cortex-m-quickstart/cortex_m_quickstart"
|
||||||
keywords = ["arm", "cortex-m", "template"]
|
keywords = ["arm", "cortex-m", "template"]
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
name = "cortex-m-quickstart"
|
name = "cortex-m-quickstart"
|
||||||
repository = "https://github.com/japaric/cortex-m-quickstart"
|
repository = "https://github.com/japaric/cortex-m-quickstart"
|
||||||
version = "0.3.3"
|
version = "0.3.4"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cortex-m = "0.5.6"
|
cortex-m = "0.5.6"
|
||||||
|
|||||||
20
ci/after-success.sh
Normal file
20
ci/after-success.sh
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
set -euxo pipefail
|
||||||
|
|
||||||
|
main() {
|
||||||
|
cargo doc
|
||||||
|
|
||||||
|
mkdir ghp-import
|
||||||
|
|
||||||
|
curl -Ls https://github.com/davisp/ghp-import/archive/master.tar.gz |
|
||||||
|
tar --strip-components 1 -C ghp-import -xz
|
||||||
|
|
||||||
|
./ghp-import/ghp_import.py target/doc
|
||||||
|
|
||||||
|
set +x
|
||||||
|
git push -fq https://$GH_TOKEN@github.com/$TRAVIS_REPO_SLUG.git gh-pages && echo OK
|
||||||
|
}
|
||||||
|
|
||||||
|
# only publish on successful merges to master
|
||||||
|
if [ $TRAVIS_BRANCH = master ] && [ $TRAVIS_PULL_REQUEST = false ] && [ $TARGET = x86_64-unknown-linux-gnu ]; then
|
||||||
|
main
|
||||||
|
fi
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
if [ $TARGET != x86_64-unknown-linux-gnu ]; then
|
||||||
rustup target add $TARGET
|
rustup target add $TARGET
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
main
|
main
|
||||||
|
|||||||
@@ -67,4 +67,6 @@ EOF
|
|||||||
rm -rf $td
|
rm -rf $td
|
||||||
}
|
}
|
||||||
|
|
||||||
main
|
if [ $TARGET != x86_64-unknown-linux-gnu ]; then
|
||||||
|
main
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user