Skip to content

Commit

Permalink
circleci: Fix deploy website
Browse files Browse the repository at this point in the history
* ensuring script is available checking out sources
* fix logic checking for the number of arguments
* fix "Repository not found" switching username and reponame
  • Loading branch information
jcfr committed Jul 25, 2018
1 parent 910522b commit ab85b24
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ jobs:
docker:
- image: circleci/python:3.7.0-stretch
steps:
- checkout
- attach_workspace:
at: ./
- run:
Expand All @@ -106,7 +107,8 @@ jobs:
name: Deploy website
command: |
source_sha=$(cat doc/_build/html/.buildinfo | grep sha | cut -d: -f2)
doc/deploy-website.sh $CIRCLE_PROJECT_REPONAME/$CIRCLE_PROJECT_USERNAME $source_sha --html-dir doc/_build/html
repo_slug=$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME
doc/deploy-website.sh $repo_slug $source_sha --html-dir doc/_build/html
deploy-release:
docker:
Expand Down
5 changes: 3 additions & 2 deletions doc/deploy-website.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ ENDHELP
#-------------------------------------------------------------------------------
if [[ -z $GITHUB_TOKEN ]]; then
err "skipping because GITHUB_TOKEN env. variable is not set"
exit 0
help
exit 1
fi

if [[ $# != 2 ]]; then
if [[ $# -lt 2 ]]; then
err "Missing org/name and source_sha parameters"
help
exit 1
Expand Down

0 comments on commit ab85b24

Please sign in to comment.