@@ -58,31 +58,42 @@ jobs:
5858 tags : |
5959 ${{ secrets.DOCKER_USERNAME }}/devopsgpt-fastapi:${{ github.ref_name }}
6060
61- - name : Deploying landing prod on the remote server
61+ - name : Deploying engine on production server
6262 if : github.ref == 'refs/heads/master'
63636464 with :
65- host : ${{ secrets.HOST }}
66- username : ${{ secrets.HOST_USERNAME }}
67- password : ${{ secrets.HOST_PASSWORD }}
65+ host : ${{ secrets.HOST_PROD }}
66+ username : ${{ secrets.HOST_USERNAME_PROD }}
67+ password : ${{ secrets.HOST_PASSWORD_PROD }}
6868 port : ${{ secrets.HOST_PORT }}
6969 script : docker compose -f devopsgpt-fastapi/docker-compose-fastapi.yml down fastapi_prod && docker compose -f devopsgpt-fastapi/docker-compose-fastapi.yml up -d --pull always fastapi_prod
7070
71- - name : Deploying landing dev on the remote server
71+ - name : Deploying engine on dev server
7272 if : github.ref == 'refs/heads/dev'
73737474 with :
75- host : ${{ secrets.HOST }}
76- username : ${{ secrets.HOST_USERNAME }}
77- password : ${{ secrets.HOST_PASSWORD }}
75+ host : ${{ secrets.HOST_DEV }}
76+ username : ${{ secrets.HOST_USERNAME_DEV }}
77+ password : ${{ secrets.HOST_PASSWORD_DEV }}
7878 port : ${{ secrets.HOST_PORT }}
7979 script : docker compose -f devopsgpt-fastapi/docker-compose-fastapi.yml down fastapi_dev && docker compose -f devopsgpt-fastapi/docker-compose-fastapi.yml up -d --pull always fastapi_dev
8080
81- - name : Removing dangle images on the remote server
81+ - name : Removing dangle images on production server
82+ if : github.ref == 'refs/heads/master'
83+ 84+ with :
85+ host : ${{ secrets.HOST_PROD }}
86+ username : ${{ secrets.HOST_USERNAME_PROD }}
87+ password : ${{ secrets.HOST_PASSWORD_PROD }}
88+ port : ${{ secrets.HOST_PORT }}
89+ script : docker image prune -f
90+
91+ - name : Removing dangle images on dev server
92+ if : github.ref == 'refs/heads/dev'
82938394 with :
84- host : ${{ secrets.HOST }}
85- username : ${{ secrets.HOST_USERNAME }}
86- password : ${{ secrets.HOST_PASSWORD }}
95+ host : ${{ secrets.HOST_DEV }}
96+ username : ${{ secrets.HOST_USERNAME_DEV }}
97+ password : ${{ secrets.HOST_PASSWORD_DEV }}
8798 port : ${{ secrets.HOST_PORT }}
8899 script : docker image prune -f
0 commit comments