Skip to content

Instantly share code, notes, and snippets.

@dcolebatch
Created February 27, 2018 11:53
Show Gist options
  • Save dcolebatch/1ff5ab111f886aa30edeba348b5213ee to your computer and use it in GitHub Desktop.
Save dcolebatch/1ff5ab111f886aa30edeba348b5213ee to your computer and use it in GitHub Desktop.
stages:
- build
- deploy
build:
stage: build
script:
- bundle install --path=vendor
- bundle exec jekyll build
artifacts:
expire_in: 3 month
paths:
- _site
only:
- master
- tags
deploy:
stage: deploy
script:
- aws s3 sync _site s3://dn.ht/ --delete
- ./cloudfront_invalidation.sh
only:
- master
- tags
#!/bin/bash
files='/*'
id="YOUR_DIST_ID"
aws cloudfront create-invalidation --distribution-id $id --paths "$files"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment