forked from ladybug-tools/ladybug
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(docs): build docs in seperate step to PyPi deployment
- Loading branch information
AntoineDao
committed
Aug 17, 2019
1 parent
f4a7afe
commit 78087b5
Showing
2 changed files
with
9 additions
and
24 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 |
---|---|---|
|
@@ -30,6 +30,11 @@ jobs: | |
- git config --global user.email "[email protected]" | ||
- git config --global user.name "ladybugbot" | ||
- npx semantic-release | ||
- stage: docs | ||
if: branch = master AND (NOT type IN (pull_request)) | ||
script: | ||
- sphinx-apidoc -f -e -d 4 -o ./docs ./ladybug ./ladybug/euclid.py | ||
- sphinx-build -b html ./docs ./docs/_build/docs | ||
deploy: | ||
provider: pages | ||
skip_cleanup: true | ||
|
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 |
---|---|---|
@@ -1,26 +1,6 @@ | ||
#!/bin/sh | ||
|
||
deploy_to_pypi() { | ||
echo "Building distribution" | ||
python setup.py sdist bdist_wheel | ||
echo "Pushing new version to PyPi" | ||
twine upload dist/* -u $PYPI_USERNAME -p $PYPI_PASSWORD | ||
} | ||
|
||
build_docs() { | ||
echo "Building documentation files" | ||
sphinx-apidoc -f -e -d 4 -o ./docs ./ladybug ./ladybug/euclid.py | ||
sphinx-build -b html ./docs ./docs/_build/docs -D release=$1 -D version=$1 | ||
} | ||
|
||
|
||
if [ -n "$1" ] | ||
then | ||
NEXT_RELEASE_VERSION=$1 | ||
else | ||
echo "A release version must be supplied" | ||
exit 1 | ||
fi | ||
|
||
deploy_to_pypi | ||
build_docs $NEXT_RELEASE_VERSION | ||
echo "Building distribution" | ||
python setup.py sdist bdist_wheel | ||
echo "Pushing new version to PyPi" | ||
twine upload dist/* -u $PYPI_USERNAME -p $PYPI_PASSWORD |