Skip to content

Commit b2b494c

Browse files
author
nimuy99
committed
#141 Deploy: 아티팩트 업로드 & 다운로드
1 parent 99d2cf5 commit b2b494c

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.github/workflows/deploy.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI/CD Pipeline with Docker
22

33
on:
44
push:
5-
branches: [ develop ] # develop 브랜치에 push 발생 시 실행
5+
branches: [ develop, dep/#141-cicd-optimizing ] # develop 브랜치에 push 발생 시 실행
66

77
jobs:
88
build:
@@ -32,6 +32,13 @@ jobs:
3232
chmod +x gradlew
3333
./gradlew bootJar
3434
35+
- name: Upload docker-compose file
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: docker-compose
39+
path: |
40+
docker-compose.yml
41+
3542
- name: Login to DockerHub
3643
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
3744

@@ -45,8 +52,10 @@ jobs:
4552
runs-on: ubuntu-latest
4653

4754
steps:
48-
- name: Checkout repository
49-
uses: actions/checkout@v4
55+
- name: Download docker-compose file
56+
uses: actions/download-artifact@v4
57+
with:
58+
name: docker-compose
5059

5160
- name: Deploy to EC2
5261
env:

src/main/java/com/memesphere/global/config/CorsMvcConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class CorsMvcConfig implements WebMvcConfigurer {
1010
@Override
1111
public void addCorsMappings(CorsRegistry corsRegistry) {
1212
corsRegistry.addMapping("/**")
13-
.allowedOrigins("http://localhost:3000", "http://15.164.103.195", "http://memesphere.site/",
13+
.allowedOrigins("http://localhost:3000", "http://3.36.128.243", "http://memesphere.site/",
1414
"https://memesphere.site/", "https://www.memesphere.site/",
1515
"http://api.memesphere.site", "https://api.memesphere.site");
1616
}

0 commit comments

Comments
 (0)