Skip to content

update main.yml

update main.yml #33

Workflow file for this run

name: docs
on:
push
jobs:
build_and_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up python
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: install dependencies
run: pip install numpy
- name: build tetgenpy
run: CC=clang-14 CXX=clang++-14 python3 setup.py develop
- name: test
run: python3 tests/test_tetgenpy.py
- name: build docs
run: |
pip install -r ./docs/requirements.txt
sphinx-apidoc -f -t docs/source/_templates -o docs/source tetgenpy
sphinx-build -W -b html docs/source docs/build
- name: deploy docs only if it is pushed to main
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
#publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build
force_orphan: true