Skip to content

Commit

Permalink
test build doc
Browse files Browse the repository at this point in the history
  • Loading branch information
GiovanniBussi committed May 21, 2024
1 parent 8b5bf1f commit a783164
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,23 @@ jobs:
with:
path: flake8_report.txt
name: flake8_report
- name: Doc
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' }}
run: |
pip install --upgrade pdoc3 jupyter nbconvert
pdoc3 -f --html -o doc/ MDRefine
( cd Examples && ./render.sh )
mkdir doc/examples
cp Examples/*html doc/examples/
( sudo apt-get install tree && cd doc/examples && tree -H '.' -L 1 --noreport --charset utf-8 > index.html )
( sudo apt-get install pandoc texlive-xetex && pdoc3 -f --pdf MDRefine > MDRefine.md && pandoc --metadata=title:"MDRefine Documentation" --from=markdown+abbreviations+tex_math_single_backslash --pdf-engine=xelatex --toc --toc-depth=4 --output=doc/MDRefine.pdf MDRefine.md )
tar czf doc.tgz doc/
- name: Upload doc to artifact
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' }}
uses: actions/upload-artifact@v3
with:
path: doc.tgz
name: doc

- name: Deploy PyPI
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' && startsWith(github.ref, 'refs/tags/') }}
Expand Down
8 changes: 8 additions & 0 deletions Examples/render.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

for file in *.ipynb
do

jupyter nbconvert --to html $file

done

0 comments on commit a783164

Please sign in to comment.