Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
# All project build tasks go here. These tasks will only be run for the
# specified commit if the commit hasn't been deployed before or if "force"
# is true.
# Modify as-needed!
- name: compare package.json of current deploy with previous deploy
command: diff {{site_path}}/package.json {{clone_path}}/package.json
register: package_diff
ignore_errors: true
no_log: true
- name: copy existing npm modules
command: cp -R {{site_path}}/node_modules {{clone_path}}
when: package_diff.rc == 0
- name: install npm modules
npm: path="{{clone_path}}"
when: package_diff.rc != 0
- name: build production version
shell: npm run build
chdir: "{{clone_path}}"
- name: generate build info file
template: src=build_info.txt dest={{clone_path}}/{{build_info_path}}
when: build_info_path is defined