Build theme CSS during deployment

Fixes #37
This commit is contained in:
Oliver Davies 2020-05-14 22:21:30 +01:00
parent 940db194ee
commit a2c1c99058
2 changed files with 18 additions and 0 deletions

View file

@ -4,6 +4,23 @@
command: install
working_dir: '{{ ansistrano_release_path.stdout }}'
- name: Generate front-end assets
command: |
{{ item.command }}
chdir={{ release_theme_path }}
creates="{{ item.creates }}"
with_items:
- command: npm install
creates: "{{ release_theme_path }}/node_modules"
- command: npm run production
creates: "{{ release_theme_path }}/dist"
- name: Remove node_modules as they are no longer needed
file:
path: "{{ release_theme_path }}/node_modules"
state: absent
- name: Generate settings.php file
include_role:
name: opdavies.drupal_settings_files