Test deploying with ansistrano

This commit is contained in:
Oliver Davies 2017-10-30 00:15:20 +00:00
parent 52797cd0c1
commit 38e76328d6
2 changed files with 10 additions and 10 deletions

View file

@ -2,9 +2,9 @@
- hosts: web - hosts: web
vars: vars:
ansistrano_deploy_to: '/var/www/oliverdavies.uk' ansistrano_deploy_to: /var/www/oliverdavies.uk
ansistrano_deploy_via: 'git' ansistrano_deploy_via: git
ansistrano_git_repo: 'https://github.com/opdavies/oliverdavies.uk.git' ansistrano_git_repo: https://github.com/opdavies/oliverdavies.uk.git
ansistrano_shared_paths: ansistrano_shared_paths:
- node_modules - node_modules
ansistrano_keep_releases: 3 ansistrano_keep_releases: 3

View file

@ -1,20 +1,20 @@
--- ---
- name: "Install node dependencies" - name: Install node dependencies
command: 'yarn install' command: yarn install
args: args:
chdir: "{{ ansistrano_release_path.stdout }}" chdir: "{{ ansistrano_release_path.stdout }}"
- name: 'Generate assets' - name: Build assets
command: 'npm run prod' command: npm run prod
args: args:
chdir: "{{ ansistrano_release_path.stdout }}" chdir: "{{ ansistrano_release_path.stdout }}"
- name: 'Install Composer dependencies' - name: Install Composer dependencies
composer: composer:
command: install command: install
working_dir: "{{ ansistrano_release_path.stdout }}" working_dir: "{{ ansistrano_release_path.stdout }}"
- name: 'Generate the site' - name: Generate the site
command: 'composer run prod' command: composer run prod
args: args:
chdir: "{{ ansistrano_release_path.stdout }}" chdir: "{{ ansistrano_release_path.stdout }}"