Skip to content

Commit

Permalink
travis setup for new docs build
Browse files Browse the repository at this point in the history
  • Loading branch information
amn41 committed May 10, 2019
1 parent 7b67e05 commit ab954df
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 20 deletions.
41 changes: 23 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ jobs:
install:
- npm install -g swagger-cli
script:
- swagger-cli validate docs/core/_static/spec/server.yml
- swagger-cli validate docs/core/_static/spec/action_server.yml
- swagger-cli validate docs/_static/spec/action-server.yml
- swagger-cli validate docs/_static/spec/rasa.yml
after_success:
- coveralls
- stage: test
Expand All @@ -112,26 +112,31 @@ jobs:
- git clone -b latest https://github.com/RasaHQ/starter-pack-rasa-stack.git
- cd starter-pack-rasa-stack
- python -m pytest tests
- stage: integration
name: "Test Docs Core"
install:
- pip install -r requirements-docs.txt
- pip install -e .[sql]
- pip list
script:
# be strict about warnings --> they will be treated as errors
- cd docs/core
- make SPHINXOPTS="-W --keep-going -A html_theme=rasabaster" html
- stage: integration
name: "Test Docs NLU"
- stage: docs
if: fork = false AND branch = "post-merge-docs" # forked repository will skip building docs, only master & PRs to it
install:
- pip install -r requirements-docs.txt
- RASABASTER=rasabaster-0.7.20.tar.gz
- curl -sSL -o $RASABASTER "https://storage.googleapis.com/docs-theme/${RASABASTER}?q=$(date +%s%N)"
- pip install $RASABASTER
- pip install --no-cache-dir -r requirements-docs.txt
- pip install git+https://${GITHUB_TOKEN}:[email protected]/RasaHQ/sphinxcontrib-versioning.git@version_list
- pip install -e .
- pip list
script:
# be strict about warnings --> they will be treated as errors
- cd docs/nlu
- make SPHINXOPTS="-W --keep-going -A html_theme=rasabaster" html
- eval "$(ssh-agent -s)"; touch docs_key; chmod 0600 docs_key
- openssl aes-256-cbc
-K $encrypted_1708c37fe733_key
-iv $encrypted_1708c37fe733_iv
-in secrets.tar.enc
-out secrets.tar
-d
- tar -xvf secrets.tar
- ssh-add docs_key
- git config --global user.email "[email protected]"
- git config --global user.name "Travis CI"
- git remote set-url --push origin "[email protected]:$TRAVIS_REPO_SLUG"
- export ${!TRAVIS*}
- sphinx-versioning push docs docs . -- -b dirhtml -A html_theme=rasabaster
- stage: deploy
name: "Deploy to PyPI"
python: 3.6
Expand Down
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,11 @@

# Sphinxcontrib configuration
scv_priority = "tags"
scv_root_ref = 'post-merge-docs'
scv_show_banner = True
scv_banner_greatest_tag = True
scv_sort = ("semver",)
scv_whitelist_branches = (re.compile("^master$"),)
scv_whitelist_branches = ('post-merge-docs',)#(re.compile("^master$"),)
# scv_whitelist_tags = ('None',)
scv_grm_exclude = ("README.md", ".gitignore", ".nojekyll", "CNAME")
scv_whitelist_tags = (
Expand Down
2 changes: 1 addition & 1 deletion requirements-docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ pygments==2.2.0
sphinxcontrib-httpdomain==1.6.1
sphinxcontrib-websupport==1.1.0
sphinxcontrib-trio==1.0.2
https://storage.googleapis.com/docs-theme/rasabaster-0.7.18.tar.gz
https://storage.googleapis.com/docs-theme/rasabaster-0.7.20.tar.gz
git+https://github.com/RasaHQ/sphinxcontrib-versioning.git#egg=sphinxcontrib-versioning
git+https://github.com/RasaHQ/sphinx_rtd_theme.git#egg=sphinx_rtd_theme

0 comments on commit ab954df

Please sign in to comment.