diff --git a/.github/workflows/frontend-web-build.yml b/.github/workflows/frontend-web-build.yml index 26d1172e..2bb49005 100644 --- a/.github/workflows/frontend-web-build.yml +++ b/.github/workflows/frontend-web-build.yml @@ -98,6 +98,7 @@ jobs: name: Deploy to server needs: docker runs-on: ubuntu-latest + if: github.event_name == 'push' steps: - name: SSH deploy @@ -107,5 +108,5 @@ jobs: username: ${{ secrets.SERVER_USER }} key: ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && secrets.SERVER_SSH_KEY_PROD || secrets.SERVER_SSH_KEY_PRE_PROD }} script: | - docker compose -f ${{ secrets.COMPOSE_PATH }} pull frontend - docker compose -f ${{ secrets.COMPOSE_PATH }} up -d --no-deps frontend + docker compose -f ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && secrets.COMPOSE_PATH_PROD || secrets.COMPOSE_PATH_PRE_PROD }} pull frontend + docker compose -f ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && secrets.COMPOSE_PATH_PROD || secrets.COMPOSE_PATH_PRE_PROD }} up -d --no-deps frontend