Skip to content

Commit

Permalink
fix github env syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
savente93 committed Sep 27, 2024
1 parent 309075c commit 9ea6914
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,23 @@ jobs:
run: |
pixi run --locked -e full-py311 docs
export CURRENT_VERSION=$(grep "__version__" hydromt/__init__.py | cut -d= -f 2 | tr -d "\" ")
if [ -z "$CURRENT_VERSION" ]; then
echo "Could not determine version, exiting..."
exit 1
fi
# are we a dev version or not?
# Are we a dev version or not?
if echo "$CURRENT_VERSION" | grep -q "dev"; then
# no dev, just echo the version number
echo "v$CURRENT_VERSION" >> "$GITHUB_ENV"
# If it's a dev version, just echo "dev"
echo "DOC_VERSION=dev" >> "$GITHUB_ENV"
else
echo "dev" >> "$GITHUB_ENV"
# Otherwise, echo the version number
echo "DOC_VERSION=v$CURRENT_VERSION" >> "$GITHUB_ENV"
fi
- name: Upload to GitHub Pages
if: ${{ github.event_name != 'pull_request' }}
uses: peaceiris/[email protected]
Expand Down

0 comments on commit 9ea6914

Please sign in to comment.