55 branches : [ main ]
66 tags : [ v* ]
77 paths :
8- - sed/**/*
8+ - src/ sed/**/*
99 - tutorial/**
1010 - .github/workflows/documentation.yml
1111 # Allows you to run this workflow manually from the Actions tab
1212 workflow_dispatch :
1313
14+ env :
15+ UV_SYSTEM_PYTHON : true
1416
1517jobs :
1618 build :
@@ -26,69 +28,50 @@ jobs:
2628 remove-android : ' true'
2729 remove-docker-images : ' true'
2830
29- # Check out repo and set up Python
30- - name : Check out the repository
31- uses : actions/checkout@v4
31+ # Check out repo and set up Python
32+ - uses : actions/checkout@v4
3233 with :
33- lfs : true
34+ fetch-depth : 0
3435
35- # Use cached python and dependencies, install poetry
36- - name : " Setup Python, Poetry and Dependencies "
37- uses : packetcoders/action- setup-cache- python-poetry@main
36+ # Setup python
37+ - name : Set up Python 3.10
38+ uses : actions/ setup-python@v5
3839 with :
39- python-version : 3.9
40- poetry-version : 1.8.3
40+ python-version : " 3.10"
41+
42+ - name : Install dependencies
43+ run : |
44+ curl -LsSf https://astral.sh/uv/install.sh | sh
4145
42- - name : Install notebook dependencies
43- run : poetry install -E notebook --with docs
46+ - name : Install package
47+ run : |
48+ uv pip install ".[docs,notebook]"
4449
4550 - name : Install pandoc
4651 run : |
4752 sudo wget https://github.com/jgm/pandoc/releases/download/3.1.8/pandoc-3.1.8-1-amd64.deb
4853 sudo dpkg -i pandoc-3.1.8-1-amd64.deb
4954
50- # rm because hextof_workflow notebook can not run outside maxwell
5155 - name : copy tutorial files to docs
5256 run : |
5357 cp -r $GITHUB_WORKSPACE/tutorial $GITHUB_WORKSPACE/docs/
54- cp -r $GITHUB_WORKSPACE/sed/config $GITHUB_WORKSPACE/ docs/sed
55-
58+ mkdir -p $GITHUB_WORKSPACE/docs/src /sed
59+ cp -r $GITHUB_WORKSPACE/src/sed/config $GITHUB_WORKSPACE/docs/src/sed/
5660
5761 - name : download RAW data
5862 # if: steps.cache-primes.outputs.cache-hit != 'true'
5963 run : |
6064 cd $GITHUB_WORKSPACE/docs
61- poetry run python scripts/download_data.py
65+ python scripts/download_data.py
6266
6367 - name : build parquet files
6468 run : |
6569 cd $GITHUB_WORKSPACE/docs
66- poetry run python scripts/build_flash_parquets.py
67- poetry run python scripts/build_sxp_parquets.py
68-
69- # to be removed later. This theme doesn't support <3.9 python and our lock file contains 3.8
70- - name : install pydata-sphinx-theme
71- run : |
72- poetry run pip install pydata-sphinx-theme
73-
74- - name : Change version for develop build
75- if : startsWith(github.ref, 'refs/heads/') && github.ref != 'refs/heads/main'
76- run : |
77- VERSION=`sed -n 's/^version = "\(.*\)".*/\1/p' $GITHUB_WORKSPACE/pyproject.toml`
78- MOD_VERSION=$VERSION".dev0"
79- echo $MOD_VERSION
80- sed -i "s/^version = \"$VERSION\"/version = \"$MOD_VERSION\"/" $GITHUB_WORKSPACE/pyproject.toml
81-
82- - name : Change version for release build
83- if : startsWith(github.ref, 'refs/tags/')
84- run : |
85- OLD_VERSION=`sed -n 's/^version = "\(.*\)".*/\1/p' $GITHUB_WORKSPACE/pyproject.toml`
86- NEW_VERSION=`echo ${GITHUB_REF#refs/tags/} | sed -n 's/^v\(.*\)/\1/p'`
87- echo $NEW_VERSION
88- sed -i "s/^version = \"$OLD_VERSION\"/version = \"$NEW_VERSION\"/" $GITHUB_WORKSPACE/pyproject.toml
70+ python scripts/build_flash_parquets.py
71+ python scripts/build_sxp_parquets.py
8972
9073 - name : build Sphinx docs
91- run : poetry run sphinx-build -b html $GITHUB_WORKSPACE/docs $GITHUB_WORKSPACE/_build
74+ run : sphinx-build -b html $GITHUB_WORKSPACE/docs $GITHUB_WORKSPACE/_build
9275
9376 - name : Upload artifact
9477 uses : actions/upload-artifact@v4
@@ -102,17 +85,12 @@ jobs:
10285 needs : build
10386 steps :
10487 - name : Checkout docs repo
105- uses : actions/checkout@v2
88+ uses : actions/checkout@v4
10689 with :
10790 repository : ${{ github.repository_owner }}/docs
10891 token : ${{ secrets.GITHUB_TOKEN }}
10992 path : ' docs-repo'
11093
111- - name : Set up Python 3.9
112- uses : actions/setup-python@v4
113- with :
114- python-version : 3.9
115-
11694 - name : Setup SSH
11795 uses : webfactory/ssh-agent@v0.9.0
11896 with :
@@ -129,11 +107,16 @@ jobs:
129107 run : |
130108 if [[ $GITHUB_REF == refs/tags/* ]]; then
131109 VERSION=${GITHUB_REF#refs/tags/}
132- echo "folder=sed/$VERSION" >> $GITHUB_OUTPUT
133- rm docs-repo/sed/stable
134- rm -rf docs-repo/sed/latest
135- ln -s -r docs-repo/sed/$VERSION docs-repo/sed/stable
136- ln -s -r docs-repo/sed/$VERSION docs-repo/sed/latest
110+ echo "folder=sed/$VERSION" >> $GITHUB_OUTPUT
111+ if [[ $VERSION == *a* ]]; then
112+ rm -rf docs-repo/sed/latest
113+ ln -s -r docs-repo/sed/$VERSION docs-repo/sed/latest
114+ else
115+ rm -rf docs-repo/sed/stable
116+ rm -rf docs-repo/sed/latest
117+ ln -s -r docs-repo/sed/$VERSION docs-repo/sed/stable
118+ ln -s -r docs-repo/sed/$VERSION docs-repo/sed/latest
119+ fi
137120 elif [[ $GITHUB_REF == refs/heads/main ]]; then
138121 rm -rf docs-repo/sed/latest
139122 echo "folder=sed/latest" >> $GITHUB_OUTPUT
0 commit comments