diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 8caafe2e..e32c2098 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -1,7 +1,7 @@ name: Codepet deploy front on: push: - branches: ['main', 'develop'] + branches: [ 'main', 'develop' ] jobs: build_and_push_to_docker_hub_frontend: name: Push Docker image to DockerHub @@ -24,6 +24,8 @@ jobs: tags: ${{ secrets.DOCKERHUB_USERNAME_FRONT }}/${{ secrets.PROJECT_NAME }}_frontend:latest build-args: | NEXT_PUBLIC_CAPTCHA_SITE_KEY=${{ secrets.NEXT_PUBLIC_CAPTCHA_SITE_KEY }} + NEXT_PUBLIC_BASE_DEV_URL=${{ secrets.NEXT_PUBLIC_BASE_DEV_URL }} + NEXT_PUBLIC_BASE_TEST_URL=${{ secrets.NEXT_PUBLIC_BASE_TEST_URL }} deploy: runs-on: ubuntu-latest needs: @@ -60,6 +62,8 @@ jobs: EMAIL_HOST_USER=${{ secrets.EMAIL_HOST_USER }} EMAIL_HOST_PASSWORD=${{ secrets.EMAIL_HOST_PASSWORD }} NEXT_PUBLIC_CAPTCHA_SITE_KEY=${{ secrets.NEXT_PUBLIC_CAPTCHA_SITE_KEY }} + NEXT_PUBLIC_BASE_DEV_URL=${{ secrets.NEXT_PUBLIC_BASE_DEV_URL }} + NEXT_PUBLIC_BASE_TEST_URL=${{ secrets.NEXT_PUBLIC_BASE_TEST_URL }} NEXT_SHARP_PATH=${{ secrets.NEXT_SHARP_PATH }} _EOF_ - name: Copy docker-compose-prod.yaml via ssh diff --git a/.github/workflows/qa_deploy.yaml b/.github/workflows/qa_deploy.yaml index b979c486..439661f6 100644 --- a/.github/workflows/qa_deploy.yaml +++ b/.github/workflows/qa_deploy.yaml @@ -1,11 +1,10 @@ - name: Codepet QA_deploy front on: push: branches: ['QA'] jobs: build_and_push_to_docker_hub_frontend: - name: Push Docker image to DockerHub + name: Push Docker image to DockerHub runs-on: ubuntu-latest steps: - name: Check out the repo diff --git a/Dockerfile b/Dockerfile index 8f2b9310..4326a1da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,8 +9,12 @@ RUN npm ci COPY . . ARG NEXT_PUBLIC_CAPTCHA_SITE_KEY +ARG NEXT_PUBLIC_BASE_DEV_URL +ARG NEXT_PUBLIC_BASE_TEST_URL ENV NEXT_PUBLIC_CAPTCHA_SITE_KEY=$NEXT_PUBLIC_CAPTCHA_SITE_KEY +ENV NEXT_PUBLIC_BASE_DEV_URL=$NEXT_PUBLIC_BASE_DEV_URL +ENV NEXT_PUBLIC_BASE_TEST_URL=$NEXT_PUBLIC_BASE_TEST_URL ENV NODE_ENV production