From 73922231c5f0283a9643519d3519a4aa429b41ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D0=B5=D0=B3=20=D0=93=D0=BE=D0=B2=D0=BE=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=D1=81=D0=BA=D0=B8=D0=B9?= Date: Fri, 27 Sep 2024 19:52:22 +0500 Subject: [PATCH] test deploy8 --- .github/workflows/prod_deploy.yaml | 110 ++++++++++++++--------------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/.github/workflows/prod_deploy.yaml b/.github/workflows/prod_deploy.yaml index c408d675..1f5f8c88 100644 --- a/.github/workflows/prod_deploy.yaml +++ b/.github/workflows/prod_deploy.yaml @@ -15,63 +15,63 @@ defaults: working-directory: . jobs: - pytest: - runs-on: ubuntu-latest - name: pytest - steps: - - name: Install Python - uses: actions/setup-python@v4 - with: - python-version: 3.11 - - - name: Install Poetry - uses: snok/install-poetry@v1 - with: - poetry-version: 1.5.0 - - - name: Check out the repo - uses: actions/checkout@v4 - - - name: Install dependencies - run: | - poetry install - - name: pytest - run: | - poetry run pytest - working-directory: adaptive_hockey_federation - build_and_push: - needs: pytest - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - - name: Build and push Docker image for Production - uses: docker/build-push-action@v5 - with: - context: . - file: infra/prod/prod.Dockerfile - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + # pytest: + # runs-on: ubuntu-latest + # name: pytest + # steps: + # - name: Install Python + # uses: actions/setup-python@v4 + # with: + # python-version: 3.11 + + # - name: Install Poetry + # uses: snok/install-poetry@v1 + # with: + # poetry-version: 1.5.0 + + # - name: Check out the repo + # uses: actions/checkout@v4 + + # - name: Install dependencies + # run: | + # poetry install + # - name: pytest + # run: | + # poetry run pytest + # working-directory: adaptive_hockey_federation + # build_and_push: + # needs: pytest + # runs-on: ubuntu-latest + + # steps: + # - uses: actions/checkout@v3 + + # - name: Login to GitHub Container Registry + # uses: docker/login-action@v3 + # with: + # registry: ${{ env.REGISTRY }} + # username: ${{ github.actor }} + # password: ${{ secrets.GITHUB_TOKEN }} + + # - name: Extract metadata for Docker + # id: meta + # uses: docker/metadata-action@v5 + # with: + # images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + # - name: Build and push Docker image for Production + # uses: docker/build-push-action@v5 + # with: + # context: . + # file: infra/prod/prod.Dockerfile + # push: true + # tags: ${{ steps.meta.outputs.tags }} + # labels: ${{ steps.meta.outputs.labels }} deploy: name: Deploy changes on server runs-on: ubuntu-latest - needs: [pytest, build_and_push] + # needs: [pytest, build_and_push] environment: name: prod_deploy steps: @@ -125,5 +125,5 @@ jobs: echo "adaptive_hockey_federation.service is active" - docker exec adaptive_hockey_federation python manage.py collectstatic --noinput - docker exec adaptive_hockey_federation python manage.py migrate \ No newline at end of file + sudo docker exec adaptive_hockey_federation python manage.py collectstatic --noinput + sudo docker exec adaptive_hockey_federation python manage.py migrate \ No newline at end of file