Move handlers back to tasks
This commit is contained in:
parent
90d9d3d691
commit
4e886c293a
3 changed files with 44 additions and 46 deletions
|
|
@ -20,13 +20,36 @@
|
|||
repo: "https://git.fudiggity.nl/sonny/newsreader.git"
|
||||
dest: "{{ app_dir }}"
|
||||
version: "{{ app_branch }}"
|
||||
update: yes
|
||||
force: yes
|
||||
notify:
|
||||
- install npm packages
|
||||
- build static files
|
||||
- run migrations
|
||||
- collect static files
|
||||
update: true
|
||||
force: true
|
||||
|
||||
- name: install npm packages
|
||||
become_user: "{{ app_user }}"
|
||||
command: /usr/bin/npm install
|
||||
args:
|
||||
chdir: "{{ app_dir }}"
|
||||
|
||||
- name: build static files
|
||||
become_user: "{{ app_user }}"
|
||||
command: /usr/bin/npm run build:prod
|
||||
args:
|
||||
chdir: "{{ app_dir }}"
|
||||
|
||||
- name: run migrations
|
||||
become_user: "{{ app_user }}"
|
||||
django_manage:
|
||||
command: migrate
|
||||
app_path: "{{ app_dir }}/src/"
|
||||
virtualenv: "{{ app_dir }}/.venv"
|
||||
settings: "newsreader.conf.production"
|
||||
|
||||
- name: collect static files
|
||||
become_user: "{{ app_user }}"
|
||||
django_manage:
|
||||
command: collectstatic
|
||||
app_path: "{{ app_dir }}/src/"
|
||||
virtualenv: "{{ app_dir }}/.venv"
|
||||
settings: "newsreader.conf.production"
|
||||
|
||||
- name: include poetry tasks
|
||||
include_role:
|
||||
|
|
|
|||
Reference in a new issue