File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6060 runs-on : ubuntu-latest
6161
6262 steps :
63- - name : SSH and redeploy
63+ - name : SSH and
6464 uses : appleboy/ssh-action@v1
6565 with :
6666 host : ${{ secrets.DEPLOY_HOST }}
@@ -74,17 +74,13 @@ jobs:
7474
7575 echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
7676
77- docker pull "${IMAGE}"
77+ cd ${{ secrets.INFRA_DIR }}
7878
79- docker stop "${CONTAINER}" 2>/dev/null
80- docker rm "${CONTAINER}" 2>/dev/null
79+ # Pull the latest image
80+ docker compose pull libdse-api
8181
82- docker run -d \
83- --name "${CONTAINER}" \
84- --restart unless-stopped \
85- -p 127.0.0.1:7860:7860 \
86- -v /opt/speech-enhancement/data:/app/data:ro \
87- "${IMAGE}"
82+ # Restart the container with the new image
83+ docker compose up -d libdse-api
8884
89- docker image prune -f
90- echo "Deployed ${IMAGE} successfully."
85+ # Clean up dangling images
86+ docker system prune -f
You can’t perform that action at this time.
0 commit comments