From dae74979f25b03cdaa2c94ba938c4c873e95e763 Mon Sep 17 00:00:00 2001 From: Chris McCarthy Date: Mon, 5 Jun 2023 23:01:45 +0100 Subject: [PATCH] Updated build-sphinx.yml to breakdown steps. Now using the same runs-on and matrix from python-ci.yaml but with only 3.10. Signed-off-by: Chris McCarthy --- .github/workflows/build-sphinx.yml | 36 +++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-sphinx.yml b/.github/workflows/build-sphinx.yml index 7ab9406a..efd0da07 100644 --- a/.github/workflows/build-sphinx.yml +++ b/.github/workflows/build-sphinx.yml @@ -11,37 +11,51 @@ on: jobs: + build: - build_sphinx_job: runs-on: ubuntu-latest + timeout-minutes: 20 + strategy: + matrix: + python-version: ["3.10"] steps: + - uses: actions/checkout@v3 - - name: Get prerequisites and clone repository - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install python dev run: | set -x sudo apt-get update - sudo apt-get install -y git sudo add-apt-repository ppa:deadsnakes/ppa -y - sudo apt install python3.10-dev -y - python -m pip install --upgrade pip - git clone "https://token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" . + sudo apt install python${{ matrix.python-version}}-dev -y + + - name: Install Git + run: | + set -x + sudo apt-get install -y git shell: bash - - name: Install Yawning-Titan for docs autosummary - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Set pip, wheel, setuptools versions run: | python -m pip install --upgrade pip==23.0.1 pip install wheel==0.38.4 --upgrade pip install setuptools==66 --upgrade pip install build + + - name: Install Yawning-Titan for docs autosummary + run: | + set -x python -m pip install -e .[dev] + - name: Run build script for Sphinx pages env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + set -x bash $PWD/docs/build-sphinx-docs-to-github-pages.sh