Update main.yml #25
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: Docs | |
on: | |
push: | |
branches: | |
- master | |
- npe2 | |
tags: | |
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 | |
pull_request: | |
branches: | |
- main | |
- npe2 | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v2.2.1 | |
with: | |
python-version: 3.9 | |
- name: Install xcb | |
run: sudo apt-get install libxcb-icccm4 | |
- name: Install dependencies | |
run: | | |
pip install opencv-python-headless "napari[all]" | |
pip install pyqt cellpose termcolor | |
pip install Sphinx sphinx-rtd-theme sphinx-tabs myst-parser | |
- name: Sphinx build | |
run: | | |
pip install . | |
cd ./docs | |
sphinx-apidoc -T -f -e -o . ../src | |
make html | |
cd .. | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
with: | |
publish_branch: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/build/html | |
force_orphan: true |