Skip to content

Commit

Permalink
[Fix] 배포 중복 pull 줄이기
Browse files Browse the repository at this point in the history
  • Loading branch information
82everywin committed Jan 28, 2025
1 parent 7f0b80f commit 4053d34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ jobs:
# .gitignore에 있는 properties파일 추가
- name: Add prod_properties
run: |
touch ./src/main/resources/application.properties
touch ./src/main/resources/application-oauth.properties
touch ./src/main/resources/application-private.properties
echo "${{ secrets.PROPERTIES }}" > ./src/main/resources/application.properties
echo "${{ secrets.OAUTHPROPERTIES }}" > ./src/main/resources/application-oauth.properties
echo "${{ secrets.PRIVATEPROPERTIES }}" > ./src/main/resources/application-private.properties
Expand All @@ -55,8 +53,7 @@ jobs:
host: ${{ secrets.EC2_HOST }}
username: ubuntu
key: ${{ secrets.EC2_KEY }}
source: |
./
source: ./*
target: ~/backend/

# Deploy to EC2
Expand All @@ -69,8 +66,6 @@ jobs:
debug: true
script: |
cd ~/backend
docker pull ${{ secrets.DOCKER_USERNAME }}/bookmile-app:latest
chmod 644 .env
sudo docker pull ${{ secrets.DOCKER_USERNAME }}/bookmile-app:latest
sudo docker-compose -f docker-compose.yml down
sudo docker-compose -f docker-compose.yml up --build -d
3 changes: 2 additions & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ spring.config.import=optional:classpath:application-private.properties
spring.profiles.include=oauth

#swagger
swagger.server-url=http://localhost:8080
swagger.local-url=http://localhost:8080
swagger.server-url=https://bookmile.site

#MySQL
spring.jpa.properties.hibernate.show_sql=true
Expand Down

0 comments on commit 4053d34

Please sign in to comment.