From 952927762a49e82227622ff25dd42a2f9dd03399 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Tue, 10 Aug 2021 19:47:14 +0800 Subject: [PATCH] Run travis build only when tagging --- .travis.yml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index f242a41..3b674a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,48 +3,39 @@ dist: bionic language: minimal +if: tag =~ /^v(\d)+(\.(\d)+){2}$/ + jobs: include: - - - name: CD + - name: Deploy language: ruby rvm: 2.7.0 - 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' - install: # overriding to drop the travis `--development` flag - bundle install --jobs=3 --retry=3 - script: - eval "$BUILD_CMD" - git: depth: false # for posts' lastmod - name: Flush Starter - script: - - eval "$FLUSH_STARTER" + script: eval "$FLUSH_STARTER" before_script: - git -C "$HOME" clone "$BUILDER_REPO" --depth=1 -q -branches: - only: /.*-stable$/ - notifications: email: recipients: