diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index da11d4c..24d3502 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -50,21 +50,21 @@ jobs: - name: Check Disk Space run: df -h - # - name: Stop and remove old container if exists - # run: | - # if [ $(docker ps -q -f name=prominhaj-portfolio-container) ]; then - # docker stop prominhaj-portfolio-container - # docker rm prominhaj-portfolio-container - # fi - - # - name: Remove old Docker images - # run: | - # docker rmi -f $(docker images -q) - - # - name: Free up Docker space - # run: | - # docker system prune -af - # docker volume prune -f + - name: Stop and remove old container if exists + run: | + if [ $(docker ps -q -f name=prominhaj-portfolio-container) ]; then + docker stop prominhaj-portfolio-container + docker rm prominhaj-portfolio-container + fi + + - name: Remove old Docker images + run: | + docker rmi -f $(docker images -q) + + - name: Free up Docker space + run: | + docker system prune -af + docker volume prune -f - name: Pull image from Docker Hub run: docker pull prominhaj/prominhaj-portfolio:latest