Skip to content

Commit

Permalink
bump travis ruby and build www in a pr
Browse files Browse the repository at this point in the history
Signed-off-by: mwrock <matt@mattwrock.com>
  • Loading branch information
mwrock committed Jun 14, 2019
1 parent 47051ae commit e70db84
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ matrix:
# Job for building and deploying the web site
#
- language: ruby
rvm: 2.3.3
rvm: 2.5.3
sudo: false
cache:
bundle: true
directories:
- www/build
env:
- AFFECTED_FILES=""
- AFFECTED_FILES="support/ci/deploy_website.sh"
- AFFECTED_DIRS="www"
- AWS_BUCKET=habitat-www
- AWS_DEFAULT_REGION=us-west-2
Expand Down
14 changes: 9 additions & 5 deletions support/ci/deploy_website.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ if [[ "${TRAVIS_PULL_REQUEST}" = "false" ]] && [[ "${TRAVIS_BRANCH}" = "master"
echo "We are not on a PR and on the master branch. Going to deploy the site."
cd www
make deploy
elif [[ "${TRAVIS_PULL_REQUEST}" = "false" ]] && [[ "${TRAVIS_BRANCH}" =~ ^acceptance_deploy ]]; then
echo "We are not on a PR and on an acceptance_deploy branch. Deploying to Acceptance."
cd www
BUILDER_WEB_URL="https://bldr.acceptance.habitat.sh" GITHUB_APP_URL="https://github.com/apps/habitat-builder-acceptance" make acceptance
elif [[ "${TRAVIS_PULL_REQUEST}" != "false" ]]; then
echo "We are on a PR. Going to just build the site."
cd www
make build
else
if [[ "${TRAVIS_PULL_REQUEST}" = "false" ]] && [[ "${TRAVIS_BRANCH}" =~ ^acceptance_deploy ]]; then
echo "We are on a PR or against the master branch. Deploying to Acceptance."
cd www
BUILDER_WEB_URL="https://bldr.acceptance.habitat.sh" GITHUB_APP_URL="https://github.com/apps/habitat-builder-acceptance" make acceptance
fi
echo "Not building web site."
fi
4 changes: 3 additions & 1 deletion www/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
build: clean
gem install bundler
# See https://bundler.io/blog/2019/01/04/an-update-on-the-bundler-2-release.html
# Due to bug in ruby 2.x, need to install same version of bundler lock file was built with
gem install bundler --version 2.0.1
bundle install
bundle exec middleman build --no-parallel
.PHONY: build
Expand Down

0 comments on commit e70db84

Please sign in to comment.