@@ -12,14 +12,14 @@ jobs:
1212 runs-on : ubuntu-latest
1313 steps :
1414 - name : Checkout repository
15- uses : actions/checkout@v4.0.0
15+ uses : actions/checkout@v4.2.2
1616 with :
1717 fetch-depth : 10
1818
1919 - name : Set up Python
20- uses : actions/setup-python@v5.1.1
20+ uses : actions/setup-python@v5.6.0
2121 with :
22- python-version : " 3.10 "
22+ python-version : " 3.13 "
2323
2424 - name : Requirements
2525 run : |
@@ -43,35 +43,54 @@ jobs:
4343 ccache -V && ccache --show-config
4444 ccache --show-stats && ccache --zero-stats
4545
46- - name : Build release docs
46+ # - name: Build release docs
47+ # run: |
48+ # HEAD=$(git rev-parse HEAD)
49+ # git fetch --all --tags
50+ # cd docs
51+ # for version in $(git tag -l); do
52+ # echo "Processing $version:"
53+ # git checkout $version
54+
55+ # # Fix links
56+ # grep -rli 'url = {https://ipc-sim.github.io/ipc-toolkit/}' ../* | xargs -i@ sed -i 's/ipc-sim.github.io\/ipc-toolkit\//github.com\/ipc-sim\/ipc-toolkit/g' @
57+ # grep -rli 'ipc-sim.github.io/ipc-toolkit' ../* | xargs -i@ sed -i 's/ipc-sim.github.io\/ipc-toolkit/ipctk.xyz/g' @
58+
59+ # pip install --force-reinstall -v "ipctk==$version"
60+ # sphinx-build source build/html/$version \
61+ # -D html_theme_options.version_dropdown=true \
62+ # -D html_theme_options.version_json=https://ipctk.xyz/versions.json
63+
64+ # # Discard changes
65+ # git reset --hard
66+ # done
67+ # pip uninstall -y ipctk
68+ # git checkout $HEAD
69+ # cp source/_static/versions.json build/html/
70+ # # Copy the custom.css to each version's build
71+ # for version in $(git tag -l); do
72+ # cp source/_static/css/custom.css build/html/$version/_static/css/
73+ # done
74+ # cd ..
75+
76+ - name : Copy release docs
4777 run : |
48- HEAD=$(git rev-parse HEAD)
4978 git fetch --all --tags
50- cd docs
51- for version in $(git tag -l); do
52- echo "Processing $version:"
53- git checkout $version
5479
55- # Fix links
56- grep -rli 'url = {https://ipc-sim.github.io/ipc-toolkit/}' ../* | xargs -i@ sed -i 's/ipc-sim.github.io\/ipc-toolkit\//github.com\/ipc-sim\/ipc-toolkit/g' @
57- grep -rli 'ipc-sim.github.io/ipc-toolkit' ../* | xargs -i@ sed -i 's/ipc-sim.github.io\/ipc-toolkit/ipctk.xyz/g' @
80+ # Checkout the versioned docs from the gh-pages branch
81+ git checkout origin/gh-pages -- 'v*'
5882
59- pip install --force-reinstall -v "ipctk==$version"
60- sphinx-build source build/html/$version \
61- -D html_theme_options.version_dropdown=true \
62- -D html_theme_options.version_json=https://ipctk.xyz/versions.json
83+ # Move the versioned docs to the build directory
84+ mkdir -p docs/build/html
85+ mv v* docs/build/html/
6386
64- # Discard changes
65- git reset --hard
66- done
67- pip uninstall -y ipctk
68- git checkout $HEAD
69- cp source/_static/versions.json build/html/
7087 # Copy the custom.css to each version's build
7188 for version in $(git tag -l); do
72- cp source/_static/css/custom.css build/html/$version/_static/css/
89+ cp docs/ source/_static/css/custom.css docs/ build/html/$version/_static/css/
7390 done
74- cd ..
91+
92+ # Copy versions.json to the root of the build
93+ cp docs/source/_static/versions.json docs/build/html/
7594
7695 - name : Build ipctk
7796 run : |
0 commit comments