Merge pull request #437 from dannyrb/fix/docs-deploy

Try shelling out to use our GITHUB_TOKEN env variable
This commit is contained in:
Danny Brown 2019-05-16 01:17:48 -04:00 committed by GitHub
commit 149ea452ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 1 deletions

View File

@ -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

View File

@ -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",

12
publishStaticSite.sh Normal file
View File

@ -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