diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index fa1ca8f1..4a3cf661 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -47,30 +47,39 @@ 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 run: | poetry run pip install pydata-sphinx-theme + - name: Change version for develop build + if: startsWith(github.ref, 'refs/heads/') && github.ref != 'refs/heads/main' + run: | + cd $GITHUB_WORKSPACE/sed + BRANCH=${GITHUB_REF#refs/heads/} + VERSION=`sed -n 's/^version = "\(.*\)".*/\1/p' pyproject.toml` + MOD_VERSION=$VERSION"_"$BRANCH + sed -i "s/^version = \"$VERSION\"/version = \"$MOD_VERSION\"/" pyproject.toml + - name: build Sphinx docs run: poetry run sphinx-build -b html $GITHUB_WORKSPACE/docs $GITHUB_WORKSPACE/_build