From 29f13c3a3b3031bd1a5f225c51985617e7d14329 Mon Sep 17 00:00:00 2001 From: Anthony Debucquoy Date: Sun, 21 Apr 2024 09:57:13 +0200 Subject: [PATCH] fixing backend deploy --- .gitea/workflows/backend.yaml | 12 ------------ .gitea/workflows/deploy.yaml | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/.gitea/workflows/backend.yaml b/.gitea/workflows/backend.yaml index a330b5c..fa91896 100644 --- a/.gitea/workflows/backend.yaml +++ b/.gitea/workflows/backend.yaml @@ -18,15 +18,3 @@ jobs: - uses: gradle/gradle-build-action@v3 - name: building run: ./gradlew backend:build -x test - # Test-backend: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - # - uses: actions/setup-java@v3 - # with: - # java-version: '21' - # distribution: 'temurin' - # - run: curl -fsSL https://get.docker.com | sh - # - uses: gradle/gradle-build-action@v3 - # - name: testing - # run: ./gradlew backend:test diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 31425c2..cb38b30 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -53,5 +53,5 @@ jobs: scp -o "StrictHostKeyChecking=no" -o "LogLevel=ERROR" -i key -r * ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:api/ - name: restarting the backend run: | - ssh -o "StrictHostKeyChecking=no" -o "LogLevel=ERROR" -i key ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} 'cd api/backend && docker build -t clyde/backend . && docker rm clyde_backend_prod -f || true && docker run --rm -d -u $(id -u clyde):$(id -g clyde) -v /var/run/postgresql:/var/run/postgresql --name clyde_backend_prod -p 4000:8080 clyde/backend && docker image prune -f' + ssh -o "StrictHostKeyChecking=no" -o "LogLevel=ERROR" -i key ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} 'docker compose up --force-recreate --build -d' - run: echo "The backend has been deployed. running at https://clyde.herisson.ovh/api"