build and deploy swiftdoc using jazzy

Skip tests on deploy stage

push to specific pages api branch
This commit is contained in:
Emily Toop 2018-08-23 10:50:00 +01:00
parent e3113783ae
commit 11f0497375
2 changed files with 19 additions and 2 deletions

View file

@ -18,9 +18,19 @@ jobs:
- stage: "Test iOS"
rust: 1.25.0
script: ./scripts/test-ios.sh
- stage: "Docs"
- stage: deploy
rust: 1.25.0
script: ./scripts/cargo-doc.sh
script: ./scripts/build-doc.sh
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
keep-history: true
local-dir: docs/apis/latest
target-branch: gh-pages-api-docs
verbose: true
on:
branch: master
script:
- cargo test --verbose --all
- cargo test --features edn/serde_support --verbose --all

7
scripts/build-doc.sh Executable file
View file

@ -0,0 +1,7 @@
#!/bin/bash
# if [[ "$TRAVIS_PULL_REQUEST" = "false" && "$TRAVIS_BRANCH" == "master" ]]; then
cargo doc --all --no-deps --release && cp -r target/doc/* docs/apis/latest/rust
gem install jazzy
jazzy --source-directory sdks/swift/Mentat/ -o docs/apis/latest/swift
# fi