From c80436265122bac47c8ee4a4da52350290f70922 Mon Sep 17 00:00:00 2001 From: kvrigor Date: Wed, 27 Nov 2024 12:32:00 +0100 Subject: [PATCH] CI: Simplified dependency installation --- .github/workflows/deploy-book.yml | 38 ++++++++++++------------------- requirements.txt | 1 + 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/.github/workflows/deploy-book.yml b/.github/workflows/deploy-book.yml index b8bb9be..a1c487e 100644 --- a/.github/workflows/deploy-book.yml +++ b/.github/workflows/deploy-book.yml @@ -2,40 +2,32 @@ name: Build and Deploy Jupyter Book on: push: - branches: - - master + branches: [ master ] + pull_request: + branches: [ master ] jobs: deploy-book: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v2 + - name: Set up Python 3.12 + uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.12' + cache: 'pip' + cache-dependency-path: | + requirements.txt - - name: Install dependencies - run: | - python -m pip install --upgrade pip - sudo apt-get update - sudo apt-get install gfortran - sudo apt-get install openmpi-bin libopenmpi-dev - sudo apt-get install libhdf5-openmpi-dev - git clone https://github.com/pyccel/psydac.git - cd psydac - python -m pip install -r requirements.txt - python -m pip install -r requirements_extra.txt --no-build-isolation - pip install . - pip install jupyter-book ghp-import sphinx_proof - python -m ipykernel install --user --name .iga-python --display-name "IGA-Python" - python -m ipykernel install --user --name v_psydac --display-name "Python (v_psydac)" + - name: Install Jupyter Book and Psydac + run: pip3 install -r requirements.txt - name: Build Jupyter Book run: jupyter-book build . - name: Deploy to GitHub Pages + if: github.ref == 'refs/heads/master' run: ghp-import -n -p -f _build/html env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 5a40e83..024f065 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,5 @@ sphinx-proof matplotlib pyccel ipykernel +notebook psydac[extra] @ git+https://github.com/pyccel/psydac.git@devel#egg=psydac \ No newline at end of file