Skip to content

Commit

Permalink
Add Elementor flush CSS on uploads sync
Browse files Browse the repository at this point in the history
  • Loading branch information
pacotole committed Aug 3, 2022
1 parent 64d049e commit 4bb1d77
Showing 1 changed file with 27 additions and 14 deletions.
41 changes: 27 additions & 14 deletions uploads.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,33 @@
msg: "ERROR: development is not a valid environment for this mode (you can't push/pull from development to development)."
when: env == "development"

- name: Pull uploads from {{ env }}
synchronize:
src: "{{ project_current }}/web/app/uploads/"
dest: "{{ project_local_path }}/web/app/uploads/"
mode: pull
recursive: yes
rsync_opts: --exclude=.DS_Store
- name: PULL uploads
block:
- name: Pull uploads from {{ env }}
synchronize:
src: "{{ project_current }}/web/app/uploads/"
dest: "{{ project_local_path }}/web/app/uploads/"
mode: pull
recursive: yes
rsync_opts: --exclude=.DS_Store

- name: Elementor flush CSS on development
connection: local
shell: vagrant ssh -- "cd {{ project_current }} && wp cli has-command 'elementor flush_css' && [ $? -eq 0 ] && wp elementor flush_css --skip-themes || cd ."
when: mode is not defined or mode == "pull"

- name: Push uploads to {{ env }}
synchronize:
src: "{{ project_local_path }}/web/app/uploads/"
dest: "{{ project_current }}/web/app/uploads/"
mode: push
recursive: yes
rsync_opts: --exclude=.DS_Store
- name: PUSH uploads
block:
- name: Push uploads to {{ env }}
synchronize:
src: "{{ project_local_path }}/web/app/uploads/"
dest: "{{ project_current }}/web/app/uploads/"
mode: push
recursive: yes
rsync_opts: --exclude=.DS_Store

- name: Elementor flush CSS on {{ env }}
shell: wp cli has-command 'elementor flush_css' && [ $? -eq 0 ] && wp elementor flush_css --skip-themes || cd .
args:
chdir: "{{ project_current }}"
when: mode is defined and mode == "push"

0 comments on commit 4bb1d77

Please sign in to comment.