Skip to content

Merge "Grid rotator" branch (#104) #257

Merge "Grid rotator" branch (#104)

Merge "Grid rotator" branch (#104) #257

name: Build docs and deploy to GitHub Pages
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build-and-deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pdoc3
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
sudo apt-get update
sudo apt-get install -yq wget libboost-python-dev libboost-program-options-dev libgdal-dev libglew-dev libglu1-mesa libproj-dev libqt5core5a libqt5gui5 libqt5network5 libqt5opengl5 libqt5svg5 libqt5widgets5 libqt5xml5 libqt5xmlpatterns5 libqwt-qt5-6
wget https://www.earthbyte.org/webdav/ftp/earthbyte/pygplates/pygplates-py3_rev33_ubuntu-20.04-amd64.deb -O pygplates_package.deb
yes | sudo dpkg -i pygplates_package.deb
- name: Install jupyter with nbconvert
run: |
pip install jupyter
- name: Install gplately
run: |
pip install .
- name : Generate documentation with pdoc3
run : |
export PYTHONPATH=$PYTHONPATH:/usr/lib/
export LD_PRELOAD=/lib/x86_64-linux-gnu/libstdc++.so.6:$LD_PRELOAD
pdoc --config latex_math=True --template-dir .pdoc_template --html -o api --force gplately
- name: Convert jupyter notebooks to html
run : |
export PYTHONPATH=$PYTHONPATH:/usr/lib/
export LD_PRELOAD=/lib/x86_64-linux-gnu/libstdc++.so.6:$LD_PRELOAD
jupyter-nbconvert --to=html --output-dir=api/gplately/ Notebooks/*.ipynb
- name : Deploy to gh-pages
uses: JamesIves/github-pages-deploy-action@v4.2.2
with:
branch: gh-pages
folder: api/gplately/