fix: a version may not exist, checkout of gh-pages skipped
@@ -45,12 +45,6 @@ jobs:
run: |
make -C docs/ SPHINXOPTS="-W" BUILDDIR="$HOME/docs" CURBRANCH="${CURBRANCH:-html}" html
- - name: Checkout gh-pages
- if: "!startsWith(github.ref, 'refs/tags/') || (github.event.pull_request.merged == true)"
- run: |
- git fetch
- git checkout -b gh-pages origin/gh-pages
-
- name: Push created tag to gh-pages
if: startsWith(github.ref, 'refs/tags/')
run: |
@@ -59,7 +53,8 @@ jobs:
echo "Could not identify release series"
exit 1
fi
- git rm -r ${MAJOR_MINOR}/
+ git checkout -b gh-pages origin/gh-pages
+ git rm -r ${MAJOR_MINOR}/ || true
# It is fundamental that the directory does not exist at all.
rm -rf ${MAJOR_MINOR}
cp -r $HOME/docs/$CURBRANCH $PWD/${MAJOR_MINOR}
@@ -73,6 +68,7 @@ jobs:
echo "$CURBRANCH is not the default development branch"
exit 1
fi
+ git checkout -b gh-pages origin/gh-pages
git rm -r master/
# It is fundamental that the directory does not exist at all.
rm -rf master
