Skip to content

Instantly share code, notes, and snippets.

@hjhart
Created June 18, 2019 21:58
Show Gist options
  • Save hjhart/a33d677da341bc89ab0b1de1d8aac159 to your computer and use it in GitHub Desktop.
Save hjhart/a33d677da341bc89ab0b1de1d8aac159 to your computer and use it in GitHub Desktop.
precompile_assets:
description: Precompile Rails Assets
steps:
- run:
name: Set up Cache Key
command: find ~/voom/app/javascript ~/voom/app/assets -type f -exec md5 -q {} \; > ~/voom/dependency_checksum
- restore_cache:
keys:
- v3-assets-{{ arch }}-{{ .Branch }}-{{ checksum "~/voom/dependency_checksum" }}
- v3-assets-{{ arch }}-{{ .Branch }}
- v3-assets-{{ arch }}
- run:
name: "Precompile assets (Note: Bump the cache prefix if this step takes over 20 seconds)"
command: ~/voom/bin/rails assets:precompile assets:clean
- save_cache:
key: v3-assets-{{ arch }}-{{ .Branch }}-{{ checksum "~/voom/dependency_checksum" }}
paths:
- ~/voom/public/assets
- ~/voom/public/packs-test
- ~/voom/public/packs
- ~/voom/.sass-cache
- ~/voom/tmp/cache/assets
- ~/voom/tmp/cache/webpacker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment