Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BE/fix] Prod workflow scipt 수정 #390

Merged
merged 3 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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


Loading