Skip to content

Commit 8ba40e2

Browse files
committed
fix : ci 수정
ci 정상 작동 테스트
1 parent 698972a commit 8ba40e2

File tree

1 file changed

+9
-25
lines changed

1 file changed

+9
-25
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,12 @@ jobs:
2525
echo "[INFO] traefik 디렉토리 내 파일"
2626
ls -l traefik || echo "❌ traefik 폴더 없음"
2727
28-
- name: Archive deployment files
29-
run: |
30-
tar -czvf deploy_bundle.tar.gz \
31-
docker-compose.backend.yml \
32-
docker-compose.portainer.yml \
33-
docker-compose.traefik.yml \
34-
traefik
35-
36-
- name: Create SSH private key file
37-
run: |
38-
echo "${{ secrets.SERVER_PEM_KEY }}" > private_key.pem
39-
chmod 600 private_key.pem
40-
41-
- name: Upload archive via scp
42-
run: |
43-
scp -i private_key.pem -o StrictHostKeyChecking=no \
44-
deploy_bundle.tar.gz ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }}:/home/ubuntu/app/
45-
46-
- name: Extract bundle on server and clean up
47-
run: |
48-
ssh -i private_key.pem -o StrictHostKeyChecking=no ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} << 'EOF'
49-
cd /home/ubuntu/app
50-
tar -xzvf deploy_bundle.tar.gz
51-
rm deploy_bundle.tar.gz
52-
EOF
28+
- name: Upload Traefik and Compose files to Server
29+
uses: appleboy/scp-action@v0.1.4
30+
with:
31+
host: ${{ secrets.SERVER_HOST }}
32+
username: ${{ secrets.SERVER_USER }}
33+
key: ${{ secrets.SERVER_PEM_KEY }}
34+
with:
35+
source: "docker-compose.backend.yml, docker-compose.portainer.yml, docker-compose.traefik.yml, traefik"
36+
target: /home/ubuntu/app

0 commit comments

Comments
 (0)