From 9a0740520702c1ded644565681f543b76001cf97 Mon Sep 17 00:00:00 2001 From: rettigl Date: Fri, 25 Oct 2024 12:06:54 +0200 Subject: [PATCH] fix version determination --- .github/workflows/documentation.yml | 56 +++++++++++++++-------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 0f338625..76364c63 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -16,15 +16,15 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Maximize build space - uses: easimon/maximize-build-space@master - with: - root-reserve-mb: 2048 - swap-size-mb: 1024 - remove-dotnet: 'true' - remove-codeql: 'true' - remove-android: 'true' - remove-docker-images: 'true' + # - name: Maximize build space + # uses: easimon/maximize-build-space@master + # with: + # root-reserve-mb: 2048 + # swap-size-mb: 1024 + # remove-dotnet: 'true' + # remove-codeql: 'true' + # remove-android: 'true' + # remove-docker-images: 'true' # Check out repo and set up Python - name: Check out the repository @@ -47,24 +47,24 @@ jobs: sudo wget https://github.com/jgm/pandoc/releases/download/3.1.8/pandoc-3.1.8-1-amd64.deb sudo dpkg -i pandoc-3.1.8-1-amd64.deb - # rm because hextof_workflow notebook can not run outside maxwell - - name: copy tutorial files to docs - run: | - cp -r $GITHUB_WORKSPACE/tutorial $GITHUB_WORKSPACE/docs/ - cp -r $GITHUB_WORKSPACE/sed/config $GITHUB_WORKSPACE/docs/sed - rm $GITHUB_WORKSPACE/docs/tutorial/5_sxp_workflow.ipynb + # # rm because hextof_workflow notebook can not run outside maxwell + # - name: copy tutorial files to docs + # run: | + # cp -r $GITHUB_WORKSPACE/tutorial $GITHUB_WORKSPACE/docs/ + # cp -r $GITHUB_WORKSPACE/sed/config $GITHUB_WORKSPACE/docs/sed + # rm $GITHUB_WORKSPACE/docs/tutorial/5_sxp_workflow.ipynb - - name: download RAW data - # if: steps.cache-primes.outputs.cache-hit != 'true' - run: | - cd $GITHUB_WORKSPACE/docs - poetry run python scripts/download_data.py + # - name: download RAW data + # # if: steps.cache-primes.outputs.cache-hit != 'true' + # run: | + # cd $GITHUB_WORKSPACE/docs + # poetry run python scripts/download_data.py - - name: build Flash parquet files - run: | - cd $GITHUB_WORKSPACE/docs - poetry run python scripts/build_flash_parquets.py + # - name: build Flash parquet files + # run: | + # cd $GITHUB_WORKSPACE/docs + # poetry run python scripts/build_flash_parquets.py # to be removed later. This theme doesn't support <3.9 python and our lock file contains 3.8 - name: install pydata-sphinx-theme @@ -111,9 +111,11 @@ jobs: - name: Determine version folder id: version-folder run: | - if [[ $GITHUB_REF == refs/tags/* ]]; then - VERSION=${GITHUB_REF#refs/tags/} + if [[ $GITHUB_REF == refs/heads/pydata-docs-theme-main ]]; then + VERSION=2.1.0 echo "folder=sed/$VERSION" >> $GITHUB_OUTPUT + rm docs-repo/latest + ln -s docs-repo/sed/$VERSION docs-repo/latest elif [[ $GITHUB_REF == refs/heads/main ]]; then echo "folder=sed/latest" >> $GITHUB_OUTPUT else @@ -122,7 +124,7 @@ jobs: - name: Update switcher.json run: | - VERSION=`grep "SED documentation." index.html | sed -n 's/.*SED \(.*\) documentation.*/\1/p'` + VERSION=`grep "<title>SED documentation." sphinx-docs/index.html | sed -n 's/.*SED \(.*\) documentation.*/\1/p'` echo "python docs-repo/sed/update_switcher.py docs-repo/sed/switcher.json $GITHUB_REF $VERSION" python docs-repo/sed/update_switcher.py docs-repo/sed/switcher.json $GITHUB_REF $VERSION