fix: configuration of the sphinx-action
@@ -24,14 +24,13 @@ jobs:
run: |
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
CURBRANCH=${GITHUB_REF##*/}
+ elif [[ "$GITHUB_REF" == refs/pull/* ]]; then
+ CURBRANCH=${GITHUB_REF%/*}
+ CURBRANCH=${CURBRANCH##*/}
elif [[ "$GITHUB_REF" == refs/heads/* ]]; then
CURBRANCH=${GITHUB_REF##*/}
fi
- if [ "$CURBRANCH" == "" ] && [[ "$GITHUB_BASE_REF" == refs/heads/* ]]; then
- CURBRANCH=${GITHUB_BASE_REF##*/}
- fi
-
# Remove forward slashes
CURBRANCH=$( echo $CURBRANCH | sed 's+/+_+g' )
echo "Building branch/tag ${CURBRANCH:-<unkwown>}, from git ref <$GITHUB_REF>"
@@ -39,5 +38,5 @@ jobs:
- uses: ammaraskar/sphinx-action@master
with:
- docs-folder: "docs/"
- build-command: make -C docs/ SPHINXOPTS="-W" BUILDDIR="$HOME/docs" CURBRANCH="${CURBRANCH:-html}" html
+ docs-folder: "."
+ build-command: make -C docs/ PYTHONPATH="${GITHUB_WORKSPACE}" SPHINXOPTS="-W" BUILDDIR="$HOME/docs" CURBRANCH="${CURBRANCH:-html}" html
