-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
7 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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] | ||
|