Skip to content

Commit

Permalink
fix version determination
Browse files Browse the repository at this point in the history
  • Loading branch information
rettigl committed Oct 25, 2024
1 parent efd67a4 commit 9a07405
Showing 1 changed file with 29 additions and 27 deletions.
56 changes: 29 additions & 27 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -122,7 +124,7 @@ jobs:
- name: Update switcher.json
run: |
VERSION=`grep "<title>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
Expand Down

0 comments on commit 9a07405

Please sign in to comment.