Merge pull request #223 from ericpre/hyperspy2.0 #105
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, pull_request] | |
jobs: | |
build_doc: | |
permissions: | |
contents: write | |
name: Build doc | |
runs-on: ubuntu-latest | |
env: | |
DISPLAY: ':0' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: '3.10' | |
- name: Install Ubuntu packages for Qt | |
shell: bash | |
run: | | |
sudo apt-get update | |
sudo apt-get install qtbase5-dev | |
sudo apt-get install libxkbcommon-x11-0 | |
sudo apt-get install libxcb-icccm4 | |
sudo apt-get install libxcb-image0 | |
sudo apt-get install libxcb-keysyms1 | |
sudo apt-get install libxcb-randr0 | |
sudo apt-get install libxcb-render-util0 | |
sudo apt-get install libxcb-xinerama0 | |
- name: Install Dependencies | |
run: | | |
pip install PyQt5 PyQtWebEngine | |
- name: Install | |
run: | | |
pip install -e .[build-doc] | |
- name: Build doc | |
run: | | |
sudo apt-get install xvfb | |
cd doc | |
xvfb-run make html | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./doc/build/* | |
- uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: doc/build/html |