Skip to content

Commit

Permalink
fix:minor chnage
Browse files Browse the repository at this point in the history
  • Loading branch information
Paribesh01 committed Nov 17, 2024
1 parent 76c7071 commit 9147607
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,9 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v3

- name: SSH into Server and Pull Docker Image
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SERVER_IP }} << 'EOF'
docker pull ${{ secrets.DOCKER_USERNAME }}/ws-server:latest
docker stop ws-server || true
docker rm ws-server || true
docker run -d --name ws-server -p 8081:8081 ${{ secrets.DOCKER_USERNAME }}/ws-server:latest
EOF
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Pull Docker Image on Runner
run: |
docker pull ${{ secrets.DOCKER_USERNAME }}/ws-server:latest
docker stop ws-server-container || true
docker rm ws-server-container || true
docker run -d --name ws-server-container -p 8081:8081 ${{ secrets.DOCKER_USERNAME }}/ws-server:latest

0 comments on commit 9147607

Please sign in to comment.