diff --git a/circle.yml b/circle.yml index 29f97d05a..ade3772f9 100644 --- a/circle.yml +++ b/circle.yml @@ -82,6 +82,9 @@ test: # testing docs generation - cd website && npm test - cd website && node ./server/generate.js + # if website can be built, deploy regardless of test failures + - if [[ ($CIRCLE_BRANCH =~ .*-stable || $CIRCLE_BRANCH == "master") && $CIRCLE_PROJECT_USERNAME == "facebook" && -z $CI_PULL_REQUEST && -z $CIRCLE_PR_USERNAME ]]; then git config --global user.email "reactjs-bot@users.noreply.github.com" && git config --global user.name "Website Deployment Script" && echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" > ~/.netrc && cd website && GIT_USER=reactjs-bot npm run gh-pages; fi + post: # copy test report for Circle CI to display - mkdir -p $CIRCLE_TEST_REPORTS/junit/ @@ -93,12 +96,12 @@ test: deployment: stable: branch: [/.*-stable/, /master/] + owner: facebook commands: - # generate docs website - git config --global user.email "reactjs-bot@users.noreply.github.com" - git config --global user.name "Website Deployment Script" - echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" > ~/.netrc - - cd website && GIT_USER=reactjs-bot npm run gh-pages + # publish to npm - node ./scripts/publish-npm.js experimental: