Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deploy_build_before example hook for theme assets #397

Merged
merged 1 commit into from
Nov 1, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
29 changes: 29 additions & 0 deletions deploy-hooks/build-before.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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
# template:
# src: "{{ item.src }}"
# dest: "{{ deploy_helper.new_release_path }}/{{ item.dest }}"
# mode: "{{ item.mode | default('0644') }}"
# 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