1
0
forked from PGL/Clyde

fixing backend deploy

This commit is contained in:
Debucquoy Anthony 2024-04-21 09:57:13 +02:00
parent 33eb5c0f0c
commit 29f13c3a3b
2 changed files with 1 additions and 13 deletions

View File

@ -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

View File

@ -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"