-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (56 loc) · 1.92 KB
/
doc.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
name: doc
on:
push:
branches:
- master
- release
- develop
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: nelonoel/[email protected]
- uses: actions/checkout@v2
- name: Install Python 3
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Dependencies
run: |
sudo apt-get install pandoc rsync
pip install -r requirements.txt
- name: Install pymoo
run: |
python -m pip install --upgrade pip
curl -L http://github.com/anyoptimization/pymoo/archive/${BRANCH_NAME}.zip --output pymoo.zip
unzip -qq pymoo.zip
pip install pymoo-${BRANCH_NAME}/
python -c "from pymoo.util.function_loader import is_compiled;print('Compiled Extensions: ', is_compiled())"
- name: Jupyter Config
run: |
mkdir ~/.ipython
mkdir ~/.ipython/profile_default
echo "c = get_config()" >> ~/.ipython/profile_default/ipython_kernel_config.py
echo "c.InlineBackend.figure_format = 'retina'" >> ~/.ipython/profile_default/ipython_kernel_config.py
echo "c.InteractiveShellApp.matplotlib = 'inline'" >> ~/.ipython/profile_default/ipython_kernel_config.py
- name: Tests
if:
contains('
refs/heads/master
refs/heads/release
', github.ref)
run: |
pytest tests/test_docs.py --overwrite --exitfirst
- name: Compile
run: |
make html
- name: Upload
uses: trendyminds/github-actions-rsync@master
with:
RSYNC_OPTIONS: -avzr --delete --exclude '*.ipynb'
RSYNC_TARGET: /home/blankjul/pymoo.org/${BRANCH_NAME}
RSYNC_SOURCE: /build/html/*
env:
SSH_PRIVATE_KEY: ${{secrets.SSH_PRIVATE_KEY}}
SSH_USERNAME: ${{secrets.SSH_USERNAME}}
SSH_HOSTNAME: ${{secrets.SSH_HOSTNAME}}