Skip to content

Commit

Permalink
Add documentation deploy (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
anders-kiaer authored May 31, 2019
1 parent 36bd004 commit b543bc9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,18 @@ script:
- pip install .[tests]
- pycodestyle webviz_config
- pytest tests
- pushd ./docs; python build_docs.py; popd

deploy:
- provider: pages
skip_cleanup: true
local_dir: ./docs/_build
github_token:
secure: zWVmufs7SMXuV2BMukQnDxvNxTS7GWDLbcGmvEqN4js7oR1h8N4qo0z27kB/OqosLEq37G429BIAIZJAu/Xxja6LLHDQmw18zTlC3wMYxifiU9l0sUn/I7zeqMpLsQERXJIzYhneG4KMvmXxUHSlouOlLKWtQHiraTshvjlAz53Bg6tz6rfASF3kG9CvhEcSVOseG2uJe1N8cBIG2huHZEsJBjVZr/JVoD+tX0y9csEGvO/B1xLJVDMY5DvMmPPCwaEb+O4OUlGpxtfmHRKUvG6fehTZXyyBJVuR58WO2uThOYmSFiaavtvjbIpvJyb8SXM2OmikFGdavipLPtPVZ9qkPorBT9NNKGGRt+h0A/1CVYV4ALp6YmF4r9hWYihMGaJlNgM0lA8322LvwfIjGH6exuZ0/EQxJb5P031icv7ZV4s8zTQON5PJtBU+GxXqVOS2hK8sSuSmvRqpQXWkOrtqKyJ0bu7jAVpw+Xr9C8oWVZ6FTr13t+/ney7PQCCnUZk+F0j3W3bIogTLrG21r49hJYP2TtDGyFf3BUf2ulfMQ+WGwJdc3WjL2XTtgi61dTo9IJKp9pk2+RMjPJQrPNu0mEsJePHHclODIieSw+/nfOsj47Ng1Ku+ZkJq09OngdzzqtMENHtdYgB/qAl+cJxm1e61wzpMLo2iUbQjAiw=
keep_history: true
on:
branch: master

- provider: pypi
user: webviz
password:
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/build_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
SCRIPT_DIR = pathlib.Path(__file__).resolve().parent
BUILD_DIR = SCRIPT_DIR / '_build'
TEMPLATE_FILE = SCRIPT_DIR / 'templates' / 'index.html.jinja2'
EXAMPLE = SCRIPT_DIR / '..' / 'tests' / 'basic_example.yaml'
EXAMPLE = SCRIPT_DIR / '..' / 'examples' / 'basic_example.yaml'


def escape_all(input_string):
Expand Down Expand Up @@ -119,7 +119,7 @@ def get_basic_example():
if BUILD_DIR.exists():
shutil.rmtree(BUILD_DIR)

shutil.copytree(SCRIPT_DIR / '_static', BUILD_DIR / '_static')
shutil.copytree(SCRIPT_DIR / 'assets', BUILD_DIR / 'assets')

with open(BUILD_DIR / 'index.html', 'w') as fh:
fh.write(template.render(template_data))
Expand Down
2 changes: 1 addition & 1 deletion docs/templates/index.html.jinja2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="./_static/webviz_doc.css">
<link rel="stylesheet" href="./assets/webviz_doc.css">

<!-- Also update package-lock.json with highlight.js version number: -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.14.2/highlight.min.js" integrity="sha256-sNPiigbfSkqUzMc5rgrdztLnneCMAp6W9wetJUZu9Zw=" crossorigin="anonymous"></script>
Expand Down

0 comments on commit b543bc9

Please sign in to comment.