Skip to content

Commit

Permalink
Use tox to build the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Luthaf committed May 27, 2024
1 parent 22dfd8d commit f396bb3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 34 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ jobs:
run: npm ci
- name: install python dependencies
run: |
python3 -m pip install -r docs/requirements.txt
python3 -m pip install beautifulsoup4 requests
python3 -m pip install tox==4.14.0
- run: npm run build
- run: npm run download-examples
- run: cd docs && make html
- run: python3 utils/generate_standalone.py -o chemiscope_standalone.html
- run: tox -e docs
- run: tox -e generate-standalone
- name: assemble full website
run: |
cp -r app/ gh-pages/
Expand All @@ -42,7 +41,7 @@ jobs:
cp -r docs/build/html/ gh-pages/docs/
rm -f gh-pages/examples/.gitignore
- name: deploy website to gh-pages
# only deploy website from main
# only deploy website from main branch
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down
29 changes: 0 additions & 29 deletions docs/Makefile

This file was deleted.

19 changes: 19 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,25 @@ commands =
isort {[testenv]lint_folders}


[testenv:docs]
description = Build chemiscope documentation
deps =
-r docs/requirements.txt

allowlist_externals = npm
commands =
npm run api-docs
sphinx-build -d docs/build/doctrees -W -b html docs/src docs/build/html


[testenv:generate-standalone]
description = Generate standalone HTML for chemiscope
deps =
beautifulsoup4
requests
commands =
python3 utils/generate_standalone.py -o chemiscope_standalone.html

[flake8]
max_line_length = 88
extend-ignore = E203

0 comments on commit f396bb3

Please sign in to comment.