948caec79c
Generate the first time so that the output directories are created. Then when PurgeCSS runs, it can look at the generated files when purging the stylesheets. Generate again to copy the final assets from "source/build" to the correct output directory. There may be a better way, but this works for now.
26 lines
656 B
YAML
26 lines
656 B
YAML
---
|
|
- name: Install Composer dependencies
|
|
composer:
|
|
command: install
|
|
working_dir: "{{ ansistrano_release_path.stdout }}"
|
|
|
|
- name: Generate the site once without assets
|
|
command: composer run prod
|
|
args:
|
|
chdir: "{{ ansistrano_release_path.stdout }}"
|
|
|
|
- name: Install Node dependencies
|
|
command: yarn install
|
|
args:
|
|
chdir: "{{ ansistrano_release_path.stdout }}"
|
|
|
|
- name: Install Webpack Encore assets
|
|
command: './node_modules/.bin/encore production'
|
|
args:
|
|
chdir: "{{ ansistrano_release_path.stdout }}"
|
|
|
|
- name: Generate the site, including assets
|
|
command: composer run prod
|
|
args:
|
|
chdir: "{{ ansistrano_release_path.stdout }}"
|