Skip to content

Commit bb70251

Browse files
committed
add docs check on pull_request
1 parent 5c09c3d commit bb70251

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

.github/workflows/docs.yaml

+7-9
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
documentation:
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-20.04
1212
steps:
1313
- name: Checkout repo
1414
uses: actions/checkout@v2
@@ -20,16 +20,14 @@ jobs:
2020
- name: Install dependencies
2121
run: |
2222
sudo apt update
23-
sudo apt-get install -y libreoffice djvulibre-bin poppler-utils tesseract-ocr libtesseract-dev tesseract-ocr-rus tesseract-ocr-eng
2423
python -m pip install --upgrade --no-cache-dir pip setuptools
25-
python -m pip install --exists-action=w --no-cache-dir -r requirements.txt
26-
python -m pip install --upgrade --upgrade-strategy eager --no-cache-dir .[torch,docs]
24+
python -m pip install --exists-action=w --no-cache-dir -r requirements1.txt
25+
python -m pip install --exists-action=w --no-cache-dir -r requirements2.txt
26+
python -m pip install --exists-action=w --no-cache-dir -r docs/requirements.txt
27+
python -m pip install --upgrade --upgrade-strategy eager --no-cache-dir .
2728
2829
- name: Build documentation
2930
# Build the documentation, you can use this command locally
3031
run: |
31-
python -m sphinx -T -E -W -b html -d docs/_build/doctrees -D language=en docs/source docs/_build
32-
cd docs/source/_static/code_examples
33-
python dedoc_usage_tutorial.py
34-
python dedoc_add_new_doc_type_tutorial.py
35-
python dedoc_add_new_structure_type_tutorial.py
32+
cd docs/source
33+
python -m sphinx -T -W --keep-going -b html -d _build/doctrees -D language=en . docs/html

.github/workflows/test_on_push.yaml

+7-4
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,15 @@ jobs:
3131
run: |
3232
sudo apt-get update
3333
sudo apt-get install -y build-essential python3-dev
34-
- name: Install torch
34+
- name: Install dependencies part 1
3535
run: |
36-
pip install torch==2.0.0
37-
- name: Install other dependencies
36+
pip install -r requirements1.txt
37+
- name: Install dependencies part 2
3838
run: |
39-
pip install -r requirements.txt --no-deps
39+
pip install -r requirements2.txt
40+
- name: Install dependencies part 3
41+
run: |
42+
pip install -r requirements3.txt --no-deps
4043
- name: Set PYTHONPATH
4144
run: |
4245
echo "PYTHONPATH=$PYTHONPATH:$(pwd)/src" >> $GITHUB_ENV

docs/.readthedocs.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ python:
1212
install:
1313
- requirements: requirements1.txt
1414
- requirements: requirements2.txt
15+
- requirements: docs/requirements.txt
1516
- method: pip
1617
path: .
1718

0 commit comments

Comments
 (0)