Skip to content

Commit 454d539

Browse files
authored
Merge pull request #167 from devopshobbies/dev
Update cicd.yml
2 parents dce2a82 + 431caec commit 454d539

File tree

1 file changed

+23
-12
lines changed

1 file changed

+23
-12
lines changed

.github/workflows/cicd.yml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -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'
6363
uses: appleboy/[email protected]
6464
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'
7373
uses: appleboy/[email protected]
7474
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+
uses: appleboy/[email protected]
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'
8293
uses: appleboy/[email protected]
8394
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

Comments
 (0)