From d2ed7c72c5b912cf2b9e1b339aeb4d17b96fd19e Mon Sep 17 00:00:00 2001 From: echo8 Date: Mon, 9 Dec 2024 11:35:56 +0900 Subject: [PATCH] also remove --- .github/workflows/build-and-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 402de53..7ea979b 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -56,7 +56,7 @@ jobs: run: ssh prod 'docker pull ghcr.io/echo8/pastesphere:latest' - name: Stop server container - run: ssh prod 'docker stop pastesphere' + run: ssh prod 'docker stop pastesphere && docker rm pastesphere' - name: Start server container with latest image run: ssh prod "docker run --name pastesphere -d -p 443:443 -v /home/$SSH_USER/data:/data -v /home/$SSH_USER/certs:/certs -e COOKIE_SECRET=$COOKIE_SECRET ghcr.io/echo8/pastesphere:latest"