Skip to content

Commit

Permalink
Merge pull request #389 from JNU-econovation/be
Browse files Browse the repository at this point in the history
[BE/fix] Prod workflow scipt 수정
  • Loading branch information
hwangdaesun authored Jul 16, 2024
2 parents dda125a + d0a2589 commit c41e4af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/devWorkflow.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: testAndDeploy
name: testAndDeploy_dev

on:
pull_request:
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/prodWorkflow.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: testAndDeploy
name: testAndDeploy_prod

on:
pull_request:
branches:
- release
- main
types:
- closed

Expand Down Expand Up @@ -50,7 +49,7 @@ jobs:
paths: ${{ github.workspace }}/**/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}

- name: Send docker-compose.yml
- name: Send docker-compose-prod.yml
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SSH_HOST }}
Expand All @@ -59,7 +58,7 @@ jobs:
source: ./BE/exceed/docker-compose-prod.yml
target: /home/ubuntu/backend-deploy

- name: Send resources-develop-environment
- name: Send resources-prod-environment
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SSH_HOST }}
Expand All @@ -72,7 +71,7 @@ jobs:
run: |
echo "${{ secrets.ENV_PROD_VARS }}" > .env.prod
- name: Send env file
- name: Send env.prod file
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SSH_HOST }}
Expand Down Expand Up @@ -101,9 +100,9 @@ jobs:
key: ${{ secrets.SSH_KEY }}
script: |
cd backend-deploy/BE/exceed
sudo docker-compose down
sudo docker-compose -f docker-compose-prod.yml down
sudo docker pull ${{ secrets.DOCKER_HUB_USER_NAME }}/gaebaljip-prod:latest
sudo docker-compose up --build -d
sudo docker-compose --env-file .env.prod -f docker-compose-prod.yml up -d
sudo docker image prune -a -f

0 comments on commit c41e4af

Please sign in to comment.