Skip to content

Commit

Permalink
docs: fix incorrect version list generation
Browse files Browse the repository at this point in the history
  • Loading branch information
guidograzioli committed Mar 1, 2022
1 parent 2635c75 commit 5eff8b7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- main
tags:
- "[0-9]+.[0-9]+.[0-9]+"
- "*.*.*"

env:
COLORTERM: 'yes'
Expand Down Expand Up @@ -65,10 +65,9 @@ jobs:
git checkout gh-pages
rm -rf $(basename ${GITHUB_REF})
mv docs/_build/html $(basename ${GITHUB_REF})
#ln --force --no-dereference --symbolic $(dirname *.*.*/index.html | sort --version-sort --reverse | head -n1) latest
ln --force --no-dereference --symbolic main latest
git show origin/main:docs/_gh_include/header.inc > index.html
(echo main; echo latest; dirname *.*.*/index.html | sort --version-sort --reverse) | xargs -I@@ -n1 echo '<li class="toctree-l1"><a class="reference internal" href="@@/">@@</a></ul>' >> index.html
(echo main; echo latest; dirname *.*.*/index.html | sort --version-sort --reverse) | xargs -I@@ -n1 echo '<li class="toctree-l1"><a class="reference internal" href="@@/">@@</a></li>' >> index.html
git show origin/main:docs/_gh_include/footer.inc >> index.html
git add $(basename ${GITHUB_REF}) latest index.html
git commit -m "Update docs for $(basename ${GITHUB_REF})" || true
Expand Down

0 comments on commit 5eff8b7

Please sign in to comment.