-
-
Notifications
You must be signed in to change notification settings - Fork 605
/
Copy pathbuild-before.yml
44 lines (43 loc) · 1.52 KB
/
build-before.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Placeholder `deploy_build_before` hook for building theme assets on the
# host machine and then copying the files to the remote server
#
# ⚠️ This example assumes your theme is using Sage 10
#
# Uncomment the lines below if you are using Sage 10
# and replace `sage` with your theme folder
#
# ---
# - name: Install npm dependencies
# command: yarn
# delegate_to: localhost
# args:
# chdir: "{{ project_local_path }}/web/app/themes/sage"
#
# - name: Install Composer dependencies
# command: composer install --no-ansi --no-dev --no-interaction --no-progress --optimize-autoloader --no-scripts --classmap-authoritative
# args:
# chdir: "{{ deploy_helper.new_release_path }}/web/app/themes/sage"
#
# - name: Compile assets for production
# command: yarn build
# delegate_to: localhost
# args:
# chdir: "{{ project_local_path }}/web/app/themes/sage"
#
# - name: Check for entrypoints
# stat:
# path: "{{ project_local_path }}/web/app/themes/sage/public/entrypoints.json"
# delegate_to: localhost
# register: entrypoints_data
# - name: Entrypoints missing
# ansible.builtin.fail:
# msg: "The theme is missing the public/entrypoints.json file"
# when: not entrypoints_data.stat.exists
#
# - name: Copy production assets
# synchronize:
# src: "{{ project_local_path }}/web/app/themes/sage/public"
# dest: "{{ deploy_helper.new_release_path }}/web/app/themes/sage"
# group: no
# owner: no
# rsync_opts: --chmod=Du=rwx,--chmod=Dg=rx,--chmod=Do=rx,--chmod=Fu=rw,--chmod=Fg=r,--chmod=Fo=r