Skip to content

Commit f1d4524

Browse files
committed
๐Ÿ› Fix: nginx๊ฐ€ ํ•œ ๋ฒˆ์ด๋ผ๋„ ์˜ฌ๋ผ๊ฐ„ ์  ์—†์œผ๋ฉด ๋‘˜ ๋‹ค ๋„์šฐ๊ธฐ
1 parent d50125b commit f1d4524

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

โ€Ž.github/workflows/github-actions.ymlโ€Ž

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,15 @@ jobs:
8787
8888
# ์ตœ์‹  ์ด๋ฏธ์ง€ pull & app ๊ต์ฒด
8989
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
90+
if docker ps -a --format '{{.Names}}' | grep -qx 'interview-be-nginx'; then
91+
# ์ด๋ฏธ nginx๊ฐ€ ํ•œ ๋ฒˆ์ด๋ผ๋„ ์˜ฌ๋ผ๊ฐ„ ์ ์ด ์žˆ์œผ๋ฉด app๋งŒ ๊ต์ฒด
9092
docker compose pull app
9193
docker compose up -d app
94+
else
95+
# nginx๊ฐ€ ํ•œ ๋ฒˆ๋„ ์—†์—ˆ๋‹ค๋ฉด ์ฒ˜์Œ์— ๋‘˜ ๋‹ค ๋„์›Œ์•ผ ํ•จ
96+
docker compose pull
97+
docker compose up -d
98+
fi
9299
93100
# ๋ถˆํ•„์š”ํ•œ ์ด๋ฏธ์ง€ ์ •๋ฆฌ
94101
docker image prune -f

0 commit comments

Comments
ย (0)