master
omidshj 2024-08-26 15:22:34 +03:30
parent 21c6706914
commit 25e003f7d5
1 changed files with 11 additions and 8 deletions

View File

@ -2,13 +2,16 @@
- name: Deploy 3d - name: Deploy 3d
hosts: all hosts: all
tasks: tasks:
- name: Go to the 3d directory and pull the latest code - name: Perform deployment tasks in the 3d directory
shell: git pull origin master block:
args: - name: Pull the latest code
chdir: /var/www/nuxt/3d shell: git pull origin master
register: git_result register: git_result
- name: Build source with Docker
- name: Build source with Docker shell: docker run -w /srv -v $(pwd):/srv -u $(id -u):$(id -g) --rm node:20.8 npm run build
shell: docker run -w /srv -v $(pwd):/srv -u $(id -u):$(id -g) --rm node:20.8 npm run build - name: down container
shell: docker compose down
- name: start container
shell: docker compose up -d
args: args:
chdir: /var/www/nuxt/3d chdir: /var/www/nuxt/3d