From 0b6360bc0b67fd744f183a643c708e521f510ed5 Mon Sep 17 00:00:00 2001 From: roschaefer Date: Mon, 9 Sep 2019 12:55:33 +0200 Subject: [PATCH] Deploy Github pages through Travis CI This solves two problems * It automatically deploys the documentation * It deploys the documentation only if the npm package is deployed (ie. if there is a git tag) and keeps both in sync --- .travis.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index c4017fcce..552534b66 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ cache: install: - yarn install --production=false --frozen-lockfile --non-interactive - # - yarn build + - yarn build - yarn build:lib before_deploy: @@ -16,10 +16,17 @@ before_deploy: - rm -Rf ./src/system/icons/_all - rm -Rf ./src/system/tokens/_examples deploy: - provider: npm - skip_cleanup: true - email: $NPM_EMAIL - api_key: $NPM_TOKEN - on: - tags: true - branch: master + - provider: npm + skip_cleanup: true + email: $NPM_EMAIL + api_key: $NPM_TOKEN + on: + tags: true + branch: master + - provider: pages + skip_cleanup: true + github_token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable + keep_history: true + on: + tags: true + branch: master