diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml index 902e279..e7f4e16 100644 --- a/.github/workflows/server.yml +++ b/.github/workflows/server.yml @@ -1,4 +1,4 @@ -name: Deploy to Digital Ocean +name: Build and Deploy to Digital Ocean on: push: @@ -18,6 +18,6 @@ jobs: with: ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - - name: Connect and deploy project + - name: Build and deploy project run: | - ssh -o "StrictHostKeyChecking=no" ${{ secrets.USER }}@${{ secrets.HOST }} "cd ~/bereal-wrapped && docker-compose up --build -d" + ssh -o "StrictHostKeyChecking=no" ${{ secrets.USER }}@${{ secrets.HOST }} "cd ~/bereal-wrapped && git reset --hard HEAD && git pull && docker-compose up --build -d"