diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b97b21c..7ad3f6f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: pip install flake8 coverage mypy types-Markdown sudo apt update && sudo apt-get install \ texlive-xetex lmodern texlive-fonts-recommended # test_pdf_pandoc - wget -O/tmp/pandoc.deb https://github.com/jgm/pandoc/releases/download/2.10/pandoc-2.10-1-amd64.deb && sudo dpkg -i /tmp/pandoc.deb + wget -O/tmp/pandoc.deb https://github.com/jgm/pandoc/releases/download/3.1.12.2/pandoc-3.1.12.2-1-amd64.deb && sudo dpkg -i /tmp/pandoc.deb - run: find -name '*.md' | xargs .github/lint-markdown.sh - run: flake8 pdoc setup.py @@ -42,6 +42,10 @@ jobs: - run: bash <(curl -s https://codecov.io/bash) - run: coverage report - run: PDOC_TEST_PANDOC=1 time python -m unittest -v pdoc.test.CliTest.test_pdf_pandoc + - uses: actions/upload-artifact@v3 + with: + name: Pdoc Documentation.pdf + path: /tmp/pdoc.pdf docs: runs-on: ubuntu-latest diff --git a/pdoc/cli.py b/pdoc/cli.py index 5fdba07c..85a78ab7 100755 --- a/pdoc/cli.py +++ b/pdoc/cli.py @@ -593,7 +593,7 @@ def docfilter(obj, _filters=args.filter.strip().split(',')): pandoc --metadata=title:"MyProject Documentation" \\ --from=markdown+abbreviations+tex_math_single_backslash \\ --pdf-engine=xelatex --variable=mainfont:"DejaVu Sans" \\ - --toc --toc-depth=4 --output=pdf.pdf pdf.md\ + --toc --toc-depth=4 --output=/tmp/pdoc.pdf pdf.md ''' diff --git a/pdoc/test/__init__.py b/pdoc/test/__init__.py index e1de7625..0e122a7b 100644 --- a/pdoc/test/__init__.py +++ b/pdoc/test/__init__.py @@ -417,7 +417,7 @@ def test_pdf_pandoc(self): run('pdoc', pdf=None) f.write(stdout.getvalue()) subprocess.run(pdoc.cli._PANDOC_COMMAND, shell=True, check=True) - self.assertTrue(os.path.exists('pdf.pdf')) + self.assertTrue(os.path.exists('/tmp/pdoc.pdf')) def test_config(self): with run_html(EXAMPLE_MODULE, config='link_prefix="/foobar/"'):