Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
79 lines (75 sloc) 2.13 KB
version: 2
default: &default
working_directory: ~/website
docker:
- image: yterajima/middleman:2.5.1
environment:
TZ: Asia/Tokyo
LANG: ja_JP.UTF-8
MM_ENV: production
jobs:
release:
<<: *default
steps:
- checkout
- run: mkdir -p ~/website/fillin/build
- restore_cache:
keys:
- gem-cache-{{ checksum "Gemfile.lock" }}
- gem-cache-
- restore_cache:
keys:
- npm-cache-{{ checksum "package-lock.json" }}
- npm-cache-
- run: |
bundle install --path vendor/bundle
npm install
- save_cache:
key: gem-cache-{{ checksum "Gemfile.lock" }}
paths: vendor/bundle
- save_cache:
key: npm-cache-{{ checksum "package-lock.json" }}
paths: node_modules
- run: |
NO_CONTRACTS=true bundle exec middleman build
NO_CONTRACTS=true bundle exec middleman s3_sync
sleep 5
aws configure set preview.cloudfront true
aws cloudfront create-invalidation --distribution-id $AWS_CLOUDFRONT_ID --paths '/*'
curl http://www.google.com/webmasters/sitemaps/ping --get --data-urlencode "sitemap=https://www.fillin-inc.com/sitemap.xml"
build:
<<: *default
steps:
- checkout
- restore_cache:
keys:
- gem-cache-{{ checksum "Gemfile.lock" }}
- gem-cache-
- restore_cache:
keys:
- npm-cache-{{ checksum "package-lock.json" }}
- npm-cache-
- run: |
bundle install --path vendor/bundle
npm install
- save_cache:
key: gem-cache-{{ checksum "Gemfile.lock" }}
paths: vendor/bundle
- save_cache:
key: npm-cache-{{ checksum "package-lock.json" }}
paths: node_modules
- run: NO_CONTRACTS=true bundle exec middleman build
workflows:
version: 2
build-release:
jobs:
- release:
filters:
branches:
only: master
only-build:
jobs:
- build:
filters:
branches:
ignore: master