Skip to content

Commit

Permalink
MNT #4
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Jan 6, 2023
1 parent fed12fd commit 4d24d5b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 53 deletions.
23 changes: 23 additions & 0 deletions .github/define_versions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

# List of documentation versions to keep.
# (should include all versions in switcher.json)
# Adding future versions will capture that version
# once it appears in the downloaded gh-pages branch.

versions=

# existing versions (to be kept)
versions+=" 1.0.0"
versions+=" 1.0.1"
versions+=" 1.0.3"
versions+=" 1.0.4"

# future versions (only expected release tags)
versions+=" 1.0.5"
versions+=" 1.0.6"
versions+=" 1.0.7"

export versions

# update file `docs/source/_static/switcher.json` before each new release
40 changes: 0 additions & 40 deletions .github/make_switcher.py

This file was deleted.

18 changes: 5 additions & 13 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,23 +76,13 @@ jobs:
mv build/html "${VERSION}"
/bin/rm -rf build
ln -s "./${VERSION}" dev
# add previous documentation (built versions)
# update the switcher.json file before a new release
wget https://github.com/prjemian/pysumreg/archive/refs/heads/gh-pages.zip
unzip -q gh-pages.zip
/bin/rm gh-pages.zip
# List of documentation versions to keep.
# (should include all versions in switcher.json)
# Adding future versions will capture that version
# once it appears in the downloaded gh-pages branch.
versions=
versions+=" 1.0.0"
versions+=" 1.0.1"
versions+=" 1.0.3"
versions+=" 1.0.4"
versions+=" 1.0.5"
versions+=" 1.0.6"
versions+=" 1.0.7"
source ../define_versions.sh
for v in ${versions}
do
if [ -d "pysumreg-gh-pages/${v}" ]
Expand All @@ -104,7 +94,9 @@ jobs:
done
echo "latest=${latest}"
ln -s "./${latest}" ./latest
/bin/rm -rf pysumreg-gh-pages
- name: Info
run: |
cd "${TEMPDIR}"
Expand Down

0 comments on commit 4d24d5b

Please sign in to comment.