File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments