Skip to content

Commit

Permalink
fix: cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
plh97 committed May 31, 2023
1 parent 1b355a6 commit b71f364
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions ansible/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
user: root
gather_facts: False
tasks:
- name: Stop running containers
docker_container:
name: "{{ item }}"
state: stopped
loop: "{{ docker_info.containers | map(attribute='Id') | list }}"
- name: Delete content & directory
file:
state: absent
path: /root/chatroom/
- name: pull latest code on develop branch
git:
repo: https://github.com/plh2/chatroom.git
Expand Down Expand Up @@ -31,11 +40,6 @@
chdir: /root/chatroom
cmd: npm run build

- name: rm container
command:
chdir: /root/chatroom
cmd: npm run down

- name: deploy
command:
chdir: /root/chatroom
Expand Down

0 comments on commit b71f364

Please sign in to comment.