diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1415e47..683dd99 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -45,4 +45,18 @@ jobs: with: context: ./backend push: true - tags: ${{ secrets.DOCKERHUB_USERNAME }}/werkzeugkiste-backend:latest \ No newline at end of file + tags: ${{ secrets.DOCKERHUB_USERNAME }}/werkzeugkiste-backend:latest + + deploy-on-server: + runs-on: ubuntu-latest + + steps: + - name: Deploy on Server + uses: appleboy/ssh-action@v1.0.0 + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USERNAME }} + key: ${{ secrets.SSH_PRIVATE_KEY }} + script: | + cd /home/theo/docker/werkzeugkiste + docker compose up -d --pull always \ No newline at end of file