From de4ae103450bb187df5075a5e20a25f905b87c8f Mon Sep 17 00:00:00 2001 From: Benjamin PILIA Date: Mon, 16 Dec 2024 14:42:38 +0100 Subject: [PATCH] test redoc url --- .github/workflows/build_and_deploy.yml | 2 ++ api/main.py | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index bbf0092..8448406 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - test_redoc_url env: IMAGE_NAME: ghcr.io/${{ github.repository }}/eg1 @@ -51,6 +52,7 @@ jobs: name: Deploy from ${{ github.ref_name }}/${{ github.sha }} runs-on: ubuntu-latest needs: build-and-push + if: github.ref_name == 'test_redoc_url' steps: - name: Trigger dev deployment run: | diff --git a/api/main.py b/api/main.py index 05a342a..d6129bd 100755 --- a/api/main.py +++ b/api/main.py @@ -19,9 +19,9 @@ description=APP_DESCRIPTION, version=APP_VERSION, contact=CONTACT, - docs_url=API_PREFIX + "/docs", - redoc_url=API_PREFIX + "/redoc", - openapi_url=API_PREFIX + "/openapi.json", + docs_url="/docs", + redoc_url="/redoc", + openapi_url="/openapi.json", ) app.add_middleware(