forked from jupyter/nbconvert
68 lines (64 loc) · 2.01 KB
/
docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Generate Docs
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
generate-docs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.7', '3.9', '3.10' ]
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install texlive-plain-generic inkscape texlive-xetex latexmk
# pandoc is not up to date in the ubuntu repos, so we install directly
wget https://github.com/jgm/pandoc/releases/download/2.14.2/pandoc-2.14.2-1-amd64.deb && sudo dpkg -i pandoc-2.14.2-1-amd64.deb
- name: Install Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: Cache pip on Linux
uses: actions/cache@v2
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}
- name: Install
run: pip install -v ".[all]"
- name: List installed packages
run: |
pip freeze
pip check
- name: Build HTML docs
env:
PYTHONWARNINGS: default
run: |
python setup.py build_sphinx -b html
- name: Upload HTML
uses: actions/upload-artifact@v2
with:
name: html
path: build/sphinx/html
- name: Build PDF docs
env:
PYTHONWARNINGS: default
run: |
python -Wd setup.py build_sphinx -b latex
cd docs
make latexpdf
- name: Upload PDF
uses: actions/upload-artifact@v2
with:
name: pdf
path: docs/build/latex/nbconvert.pdf
- name: Check links
run: python setup.py build_sphinx -b linkcheck