From 13344df4ca0c32d590bc4d3c685aa969f1dc17a7 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 13 Feb 2018 19:31:49 +0000 Subject: [PATCH] Fix Laravel Mix deployment --- ansible/deploy.yml | 2 -- ansible/deploy/after-symlink-shared.yml | 18 +++++------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/ansible/deploy.yml b/ansible/deploy.yml index 94f7ed01..6d1b9576 100644 --- a/ansible/deploy.yml +++ b/ansible/deploy.yml @@ -16,8 +16,6 @@ ansistrano_deploy_via: git ansistrano_git_repo: https://github.com/opdavies/oliverdavies.uk.git ansistrano_git_branch: "{{ git_branch }}" - ansistrano_shared_paths: - - node_modules ansistrano_keep_releases: 3 ansistrano_allow_anonymous_stats: false ansistrano_after_symlink_shared_tasks_file: "{{ playbook_dir }}/deploy/after-symlink-shared.yml" diff --git a/ansible/deploy/after-symlink-shared.yml b/ansible/deploy/after-symlink-shared.yml index d35fd1a5..7a4b42e8 100644 --- a/ansible/deploy/after-symlink-shared.yml +++ b/ansible/deploy/after-symlink-shared.yml @@ -5,21 +5,13 @@ working_dir: "{{ ansistrano_release_path.stdout }}" - name: Generate the site once without assets - command: composer run prod - args: - chdir: "{{ ansistrano_release_path.stdout }}" + command: composer run prod chdir={{ ansistrano_release_path.stdout }} - name: Install Node dependencies - command: yarn install - args: - chdir: "{{ ansistrano_release_path.stdout }}" + command: yarn install chdir={{ ansistrano_release_path.stdout }} -- name: Install Laravel Mix assets - command: yarn run production - args: - chdir: "{{ ansistrano_release_path.stdout }}" +- name: Generate assets with Laravel Mix + command: yarn run production chdir={{ ansistrano_release_path.stdout }} - name: Generate the site, including assets - command: composer run prod - args: - chdir: "{{ ansistrano_release_path.stdout }}" + command: composer run prod chdir={{ ansistrano_release_path.stdout }}