From 67bd6679b90be8060a7c02174b67884365524a78 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sat, 8 Jan 2022 01:33:16 +0800 Subject: [PATCH] Update travis: deploy only when tagging The bundler cache is also disabled because the tag name is always changing --- .travis.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4ad238d..34eddf4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,8 @@ dist: bionic language: minimal -branches: - only: - - /^release\/(\d)+(\.(\d)+){1}$/ +# only run on tags +if: branch =~ /^v(\d)+(\.(\d)+){2}$/ OR tag IS present jobs: include: @@ -15,22 +14,13 @@ jobs: addons: apt: packages: - # required to avoid SSL error (for htmlproofer) - - libcurl4-openssl-dev - cache: - directories: - - $TRAVIS_BUILD_DIR/vendor/bundle - before_install: - # match the Gemfile.lock, travis' bundler is 2.1.2 - - gem install bundler:2.2.4 - - bundle config path 'vendor/bundle' + - libcurl4-openssl-dev # to avoid SSL error (for htmlproofer) install: - # overriding to drop the travis `--development` flag - - bundle install --jobs=3 --retry=3 + - bundle install --jobs=3 --retry=3 # overriding to drop the travis `--development` flag script: - eval "$BUILD_CMD" git: - depth: false # for posts' lastmod + depth: false # for posts' lastmod - name: Flush Starter script: eval "$FLUSH_STARTER"