Skip to content

Instantly share code, notes, and snippets.

@tangrufus
Last active August 16, 2017 01:41
Show Gist options
  • Save tangrufus/cf40991be9216513915d8327d13d0a20 to your computer and use it in GitHub Desktop.
Save tangrufus/cf40991be9216513915d8327d13d0a20 to your computer and use it in GitHub Desktop.
# 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')}}"
# group_vars/all/main.yml
static_asset_paths:
- 'web/wp'
- 'web/app/plugins'
- 'web/app/themes/sage/dist' # For Sage, change accordingly
@partounian
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment