Last active
August 16, 2017 01:41
-
-
Save tangrufus/cf40991be9216513915d8327d13d0a20 to your computer and use it in GitHub Desktop.
Time trellis gzip task - https://github.com/roots/trellis/pull/865
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# roles/deploy/hooks/build-after.yml | |
- debug: | |
msg: "Before Gzip static assets: {{lookup('pipe', 'date')}}" | |
- name: Gzip static assets | |
shell: "gzip --best --keep --force {{ static_assets | map(attribute='path') | join(' ') }}" | |
when: project.gzip_assets_on_deploy | default(gzip_assets_on_deploy) | |
- debug: | |
msg: "After Gzip static assets: {{lookup('pipe', 'date')}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# group_vars/all/main.yml | |
static_asset_paths: | |
- 'web/wp' | |
- 'web/app/plugins' | |
- 'web/app/themes/sage/dist' # For Sage, change accordingly |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think haven't it on by default is good but we should comment out the line for sage as not everyone uses sage but it's still nice to keep it in for others to see.