Skip to content

Commit 0395504

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

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-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

+10-4
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,18 @@ 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 --no-deps
37+
- name: Install dependencies part 2
3838
run: |
39-
pip install -r requirements.txt --no-deps
39+
pip install -r requirements2.txt --no-deps
40+
- name: just check
41+
run: |
42+
pip list
43+
- name: Install dependencies part 3
44+
run: |
45+
pip install -r requirements3.txt --no-deps
4046
- name: Set PYTHONPATH
4147
run: |
4248
echo "PYTHONPATH=$PYTHONPATH:$(pwd)/src" >> $GITHUB_ENV

0 commit comments

Comments
 (0)