Update CI checkout to v4 #126
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: documentation | |
on: | |
push: | |
branches: devel | |
pull_request: | |
branches: | |
- devel | |
workflow_dispatch: | |
jobs: | |
# There is no way as of now to move artifacts around jobs and | |
# across workflows. So we build the Python bindings here too. | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
# Build manifpy | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.6 | |
- name: Setup apt | |
run: | | |
sudo apt update | |
sudo apt install -y libeigen3-dev | |
- name: Setup | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install build | |
- name: Build | |
run: python -m pip install -v . | |
# build: | |
# runs-on: ubuntu-20.04 | |
# needs: [pybind11] | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v2 | |
# - name: Set up Python | |
# uses: actions/setup-python@v2 | |
# Build documentation website | |
- name: Fetch apt deps | |
run: | | |
sudo apt update | |
sudo apt install -y libeigen3-dev flex bison graphicsmagick-imagemagick-compat | |
- name: Make install Doxygen | |
run: | | |
git clone --depth 1 --branch Release_1_9_1 https://github.com/doxygen/doxygen.git | |
cd doxygen && mkdir build && cd build | |
cmake -G "Unix Makefiles" .. | |
sudo make install | |
- name: Fetch Python deps | |
run: python -m pip install jinja2 Pygments docutils | |
- name: Fetch m.css | |
uses: actions/checkout@v3 | |
with: | |
repository: mosra/m.css | |
path: docs/m.css | |
- name: Build Python docs | |
working-directory: ${{runner.workspace}}/manif/docs | |
run: python m.css/documentation/python.py conf_python.py | |
- name: Build C++ docs | |
working-directory: ${{runner.workspace}}/manif/docs | |
run: | | |
mkdir -p site/cpp | |
python m.css/documentation/doxygen.py conf_cpp.py | |
- name: Build site | |
working-directory: ${{runner.workspace}}/manif/docs | |
run: python m.css/documentation/doxygen.py conf.py | |
- name: Latex equation white color | |
working-directory: ${{runner.workspace}}/manif/docs | |
run: ./fix_latex_color.sh | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: site | |
path: docs/site | |
deploy: | |
runs-on: ubuntu-20.04 | |
needs: [build] | |
# todo: deploy if new tag/release | |
if: | | |
github.repository == 'artivis/manif' && | |
github.event_name == 'push' && github.ref == 'refs/heads/devel' | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
name: site | |
path: site | |
- name: Deploy | |
uses: JamesIves/[email protected] | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: site |