From 4d0da694bae0353dc72ff08a1458d312de666478 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 10 May 2022 16:00:36 +0800 Subject: [PATCH] update github token in travis --- .travis.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4516b6d16c1..6816f00d0b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -225,14 +225,14 @@ after_success: fi; fi; ## publish latest website, variables below are secure environment variables which are unavailable to PRs from forks. - #- if [ "$TRAVIS_BRANCH" = "master" ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then - # cd website; - # git config --global user.name "${GH_NAME}"; - # git config --global user.email "${GH_EMAIL}"; - # echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc; - # yarn install; - # GIT_USER="${GH_NAME}" yarn run publish-gh-pages; - # fi; + - if [ "$TRAVIS_BRANCH" = "master" ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then + cd website; + git config --global user.name "${GH_NAME}"; + git config --global user.email "${GH_EMAIL}"; + echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc; + yarn install; + GIT_USER="${GH_NAME}" yarn run publish-gh-pages; + fi; env: - DOCKER_GENERATOR_IMAGE_NAME=openapitools/openapi-generator-online DOCKER_CODEGEN_CLI_IMAGE_NAME=openapitools/openapi-generator-cli NODE_ENV=test CC=gcc-5 CXX=g++-5