81 lines (71 loc) · 2.22 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
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Docs
on:
push:
branches:
- "master"
- "maintenance/.+"
pull_request:
branches:
- "master"
- "maintenance/.+"
schedule:
# Run a cron job once daily, weekdays only
- cron: "0 3 * * 1-5"
jobs:
docs:
name: Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: "3.7"
activate-environment: teachopencadd
channel-priority: true
environment-file: devtools/test_env.yml
auto-activate-base: false
- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a
- name: Install package
shell: bash -l {0}
run: |
pip install . --no-deps -vv
- name: Environment Information
shell: bash -l {0}
run: |
conda info --all
conda list
- name: Run Sphinx
shell: bash -l {0}
run: |
cd docs
make clean
SPHINXOPTS="-j2 -W -T --keep-going" make html
# Extra UGLY patch to fix PDF IFrame on T005
cp talktorials/images/*.pdf _build/html/_images/
sed -i 's|src="images/butina_full.pdf"|src="../_images/butina_full.pdf"|g' \
_build/html/talktorials/T005_compound_clustering.html
- name: Check 404s (Sphinx)
shell: bash -l {0}
run: |
cd docs/_build/html
python -m http.server > /dev/null &2>1&
npx broken-link-checker http://localhost:8000/ --ordered --recursive \
--exclude "*.txt" \
--exclude "https://onlinelibrary.wiley.com/doi/full/10.1002/cmdc.200700139" \
--exclude "https://onlinelibrary.wiley.com/doi/10.1002/9783527806539.*" \
--exclude "http://doi.org/10.6019/CHEMBL.database.27"
- name: Check 404s (README)
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
max-depth: 1
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html