Skip to content

Commit

Permalink
ci(deploy): deploy workflows process modify
Browse files Browse the repository at this point in the history
  • Loading branch information
Yang Li committed Jul 23, 2024
1 parent 6476c02 commit f0808e1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ jobs:
port: ${{ secrets.SSH_PORT }}
envs: IMAGE,CONTAINER
script: |
if docker ps -a | grep "$CONTAINER_NAME"; then
docker stop $CONTAINER_NAME && docker rm $CONTAINER_NAME && docker rmi $IMAGE
fi
docker pull $IMAGE
docker stop $CONTAINER || true
docker rm $CONTAINER || true
docker run -d --name $CONTAINER -p 80:80 -p 443:443 -v /data/nginx-certs:/etc/nginx/certs $IMAGE

0 comments on commit f0808e1

Please sign in to comment.