Skip to content

Commit 03de126

Browse files
committed
fix: a version may not exist, checkout of gh-pages skipped
1 parent a76b3eb commit 03de126

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

.github/workflows/docs-build-update.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,6 @@ jobs:
4545
run: |
4646
make -C docs/ SPHINXOPTS="-W" BUILDDIR="$HOME/docs" CURBRANCH="${CURBRANCH:-html}" html
4747
48-
- name: Checkout gh-pages
49-
if: "!startsWith(github.ref, 'refs/tags/') || (github.event.pull_request.merged == true)"
50-
run: |
51-
git fetch
52-
git checkout -b gh-pages origin/gh-pages
53-
5448
- name: Push created tag to gh-pages
5549
if: startsWith(github.ref, 'refs/tags/')
5650
run: |
@@ -59,7 +53,8 @@ jobs:
5953
echo "Could not identify release series"
6054
exit 1
6155
fi
62-
git rm -r ${MAJOR_MINOR}/
56+
git checkout -b gh-pages origin/gh-pages
57+
git rm -r ${MAJOR_MINOR}/ || true
6358
# It is fundamental that the directory does not exist at all.
6459
rm -rf ${MAJOR_MINOR}
6560
cp -r $HOME/docs/$CURBRANCH $PWD/${MAJOR_MINOR}
@@ -73,6 +68,7 @@ jobs:
7368
echo "$CURBRANCH is not the default development branch"
7469
exit 1
7570
fi
71+
git checkout -b gh-pages origin/gh-pages
7672
git rm -r master/
7773
# It is fundamental that the directory does not exist at all.
7874
rm -rf master

0 commit comments

Comments
 (0)