Skip to content

Commit 7bb95fe

Browse files
committed
test ci 34 проверка деплоя нихрена не понимаю уже!!!!
1 parent be8bc67 commit 7bb95fe

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,16 @@ jobs:
103103
- name: Deploy to server
104104
run: |
105105
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SERVER_IP }} << 'EOF'
106-
docker pull ${{ secrets.DOCKER_HUB_USERNAME }}/library:${{ github.sha }}
107-
docker stop library || true
108-
docker rm library || true
109-
docker run -d --name library -p 80:8000 ${{ secrets.DOCKER_HUB_USERNAME }}/library:${{ github.sha }}
110-
EOF
106+
cd ${{ secrets.DEPLOY_DIR }}
107+
git pull origin main
108+
docker compose down
109+
docker compose up -d --build
110+
EOF
111+
112+
# run: |
113+
# ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SERVER_IP }} << 'EOF'
114+
# docker pull ${{ secrets.DOCKER_HUB_USERNAME }}/library:${{ github.sha }}
115+
# docker stop library || true
116+
# docker rm library || true
117+
# docker run -d --name library -p 80:8000 ${{ secrets.DOCKER_HUB_USERNAME }}/library:${{ github.sha }}
118+
# EOF

0 commit comments

Comments
 (0)