Skip to content

Commit 3e39a0b

Browse files
committed
publish docs on GH pages
1 parent a79ea9b commit 3e39a0b

File tree

5 files changed

+35
-3
lines changed

5 files changed

+35
-3
lines changed

.travis.yml

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ language: rust
22

33
matrix:
44
include:
5+
- env: TARGET=x86_64-unknown-linux-gnu
6+
rust: nightly
7+
if: branch = master AND type != pull_request
8+
59
- env: TARGET=thumbv6m-none-eabi
610
rust: nightly
711
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
@@ -26,6 +30,9 @@ install:
2630
script:
2731
- bash ci/script.sh
2832

33+
after_success:
34+
- bash ci/after-success.sh
35+
2936
after_script: set +e
3037

3138
cache: cargo

Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
authors = ["Jorge Aparicio <[email protected]>"]
33
categories = ["embedded", "no-std"]
44
description = "A template for building applications for ARM Cortex-M microcontrollers"
5+
documentation = "https://rust-embedded.github.io/cortex-m-quickstart/cortex_m_quickstart"
56
keywords = ["arm", "cortex-m", "template"]
67
license = "MIT OR Apache-2.0"
78
name = "cortex-m-quickstart"
89
repository = "https://github.com/japaric/cortex-m-quickstart"
9-
version = "0.3.3"
10+
version = "0.3.4"
1011

1112
[dependencies]
1213
cortex-m = "0.5.6"

ci/after-success.sh

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
set -euxo pipefail
2+
3+
main() {
4+
cargo doc
5+
6+
mkdir ghp-import
7+
8+
curl -Ls https://github.com/davisp/ghp-import/archive/master.tar.gz |
9+
tar --strip-components 1 -C ghp-import -xz
10+
11+
./ghp-import/ghp_import.py target/doc
12+
13+
set +x
14+
git push -fq https://$GH_TOKEN@github.com/$TRAVIS_REPO_SLUG.git gh-pages && echo OK
15+
}
16+
17+
# only publish on successful merges to master
18+
if [ $TRAVIS_BRANCH = master ] && [ $TRAVIS_PULL_REQUEST = false ] && [ $TARGET = x86_64-unknown-linux-gnu ]; then
19+
main
20+
fi

ci/install.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
set -euxo pipefail
22

33
main() {
4-
rustup target add $TARGET
4+
if [ $TARGET != x86_64-unknown-linux-gnu ]; then
5+
rustup target add $TARGET
6+
fi
57
}
68

79
main

ci/script.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,6 @@ EOF
6767
rm -rf $td
6868
}
6969

70-
main
70+
if [ $TARGET != x86_64-unknown-linux-gnu ]; then
71+
main
72+
fi

0 commit comments

Comments
 (0)