-
Notifications
You must be signed in to change notification settings - Fork 1
86 lines (70 loc) · 2.21 KB
/
main.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
82
83
84
85
86
# From https://github.com/marketplace/actions/deploy-mkdocs
name: Publish via MkDocs
on:
push:
branches:
- main
# - name: Install Sphinx
# run: sudo apt-get install -y python3-sphinx python3-sphinx-bootstrap-theme
jobs:
apidocs:
name: Build API docs
runs-on: ubuntu-latest
steps:
- name: Checkout dtw-python repo
uses: actions/checkout@v3
with:
repository: DynamicTimeWarping/dtw-python
path: dtw-python
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: graphviz
version: 1.0
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
cache-dependency-path: dtw-python/docs/apidocs-requirements.txt
- run: pip install -r dtw-python/docs/apidocs-requirements.txt
# - name: Install dependencies
# run: |
# sudo apt-get install -y graphviz
# pip install sphinx sphinx-automodapi sphinx-bootstrap-theme numpy scipy
- name: Build DTW in-place
run: pip3 install -e dtw-python
- name: Build docs
run: |
rm -rf dtw-python/docs/api
make -C dtw-python/docs clean
make -C dtw-python/docs html
tar -cvf api-docs.tar -C dtw-python/docs/_build/ html
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: api-docs
path: api-docs.tar
if-no-files-found: error
site:
name: Build website
needs: apidocs
runs-on: ubuntu-latest
steps:
- name: Checkout master
uses: actions/checkout@v1
- name: Download API docs
uses: actions/download-artifact@v3
with:
name: api-docs
- name: Extract API docs
# cp -a dtw-python/docs/_build/html docs/py-api
run: |
mkdir -p docs/py-api
tar -xf api-docs.tar -C docs/py-api
echo Dir is now...
ls -lR
- name: Run MkDocs docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REQUIREMENTS: mkdocs-requirements.txt