Skip to content

Commit

Permalink
add docs check on pull_request
Browse files Browse the repository at this point in the history
  • Loading branch information
mishadr committed Jul 12, 2024
1 parent 5c09c3d commit 3fc9c55
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
documentation:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v2
Expand All @@ -20,16 +20,14 @@ jobs:
- name: Install dependencies
run: |
sudo apt update
sudo apt-get install -y libreoffice djvulibre-bin poppler-utils tesseract-ocr libtesseract-dev tesseract-ocr-rus tesseract-ocr-eng
sudo apt-get install build-essential python3-dev
python -m pip install --upgrade --no-cache-dir pip setuptools
python -m pip install --exists-action=w --no-cache-dir -r requirements.txt
python -m pip install --upgrade --upgrade-strategy eager --no-cache-dir .[torch,docs]
python -m pip install --exists-action=w --no-cache-dir -r requirements1.txt
python -m pip install --exists-action=w --no-cache-dir -r requirements2.txt
python -m pip install --exists-action=w --no-cache-dir -r docs/requirements.txt
python -m pip install --upgrade --upgrade-strategy eager --no-cache-dir .
- name: Build documentation
# Build the documentation, you can use this command locally
run: |
python -m sphinx -T -E -W -b html -d docs/_build/doctrees -D language=en docs/source docs/_build
cd docs/source/_static/code_examples
python dedoc_usage_tutorial.py
python dedoc_add_new_doc_type_tutorial.py
python dedoc_add_new_structure_type_tutorial.py
python -m sphinx -T -W --keep-going -b html -d _build/doctrees -D language=en . docs/html
11 changes: 7 additions & 4 deletions .github/workflows/test_on_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,15 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y build-essential python3-dev
- name: Install torch
- name: Install dependencies part 1
run: |
pip install torch==2.0.0
- name: Install other dependencies
pip install -r requirements1.txt --no-deps
- name: Install dependencies part 2
run: |
pip install -r requirements.txt --no-deps
pip install -r requirements2.txt --no-deps
- name: Install dependencies part 3
run: |
pip install -r requirements3.txt --no-deps
- name: Set PYTHONPATH
run: |
echo "PYTHONPATH=$PYTHONPATH:$(pwd)/src" >> $GITHUB_ENV
Expand Down

0 comments on commit 3fc9c55

Please sign in to comment.