Skip to content

Commit

Permalink
Add deploy_build_before example hook for theme assets
Browse files Browse the repository at this point in the history
  • Loading branch information
retlehs committed Oct 26, 2015
1 parent 6e277a4 commit 52626c0
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### HEAD
* Add deploy_build_before example hook for theme assets ([#397](https://github.com/roots/trellis/pull/37))
* Use curl instead of dig for IP lookups ([#390](https://github.com/roots/trellis/pull/390))
* Update SSL cipher suite ([#386](https://github.com/roots/trellis/pull/386))
* Support for other Vagrant providers (VirtualBox, VMWare, Parallels) ([#340](https://github.com/roots/trellis/pull/340))
Expand Down
30 changes: 30 additions & 0 deletions deploy-hooks/build-before.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Placeholder `deploy_build_before` hook for building theme assets locally
# and then copying the files to the remote server
#
# Uncomment the lines below and replace `sage` with your theme folder
#
# ---
# - name: Run npm install
# command: npm install
# connection: local
# args:
# chdir: "{{ project.local_path }}/web/app/themes/sage"
# - name: Run bower install
# command: bower install
# connection: local
# args:
# chdir: "{{ project.local_path }}/web/app/themes/sage"
# - name: Run gulp
# command: gulp --production
# connection: local
# args:
# chdir: "{{ project.local_path }}/web/app/themes/sage"
# - name: Copy project local files
# synchronize: src="{{ item.src }}"
# dest="{{ deploy_helper.new_release_path }}/{{ item.dest }}"
# group=no
# owner=no
# rsync_opts=--chmod=Du=rwx,--chmod=Dg=rx,--chmod=Do=rx,--chmod=Fu=rw,--chmod=Fg=r,--chmod=Fo=r
# with_items:
# - src: "{{ project.local_path }}/web/app/themes/sage/dist"
# dest: web/app/themes/sage
1 change: 1 addition & 0 deletions deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
remote_user: "{{ web_user }}"

vars:
deploy_build_before: "{{ playbook_dir }}/deploy-hooks/build-before.yml"
deploy_build_after: "{{ playbook_dir }}/roles/deploy/hooks/build-after.yml"
deploy_finalize_after: "{{ playbook_dir }}/roles/deploy/hooks/finalize-after.yml"
project: "{{ wordpress_sites[site] }}"
Expand Down

0 comments on commit 52626c0

Please sign in to comment.