Skip to content

Commit

Permalink
rewrite docs version for develop build
Browse files Browse the repository at this point in the history
  • Loading branch information
rettigl committed Oct 25, 2024
1 parent 895b001 commit ee13e7c
Showing 1 changed file with 24 additions and 15 deletions.
39 changes: 24 additions & 15 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ee13e7c

Please sign in to comment.