diff --git a/.circleci/config.yml b/.circleci/config.yml index 802af7c1c..14d013f70 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -84,6 +84,7 @@ jobs: no\n" > ~/.ssh/config - run: git config --global user.email "gh-pages@localhost" - run: git config --global user.name "npm gh-pages" + - run: yarn global add gh-pages - run: name: Generate Docs command: yarn run staticDeploy diff --git a/package.json b/package.json index 47f545899..309cc3011 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "test": "jest", "test:ci": "jest --ci --runInBand --collectCoverage --reporters=default --reporters=jest-junit && codecov", "staticDeploy": "./generateStaticSite.sh", - "docs:publish": "gh-pages -d docs/latest/_book", + "docs:publish": "./publishStaticSite.sh", "start": "yarn run dev", "predeploy": "cd example && npm install && yarn run build:package", "preBuild": "yarn run version && yarn run copy:webworkers", diff --git a/publishStaticSite.sh b/publishStaticSite.sh new file mode 100644 index 000000000..26c3e89c6 --- /dev/null +++ b/publishStaticSite.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Set directory to location of this script +# https://stackoverflow.com/a/3355423/1867984 +cd "$(dirname "$0")" + +echo 'PUBLISHING' + +./node_modules/.bin/gh-pages \ + --silent \ + --repo https://$GITHUB_TOKEN@github.com/OHIF/Viewers.git \ + --dist docs/latest/_book