From ec4a1e762621a22bc463d0df81c640bcff9c8e69 Mon Sep 17 00:00:00 2001 From: bevuxyna Date: Mon, 20 Mar 2023 20:21:34 +0300 Subject: [PATCH 01/51] Revert "fix" This reverts commit f89be0648623393934fcd41a9b84d51daa4c01dc. --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index bc78fa58..cce148da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "help_paw_frontend", "version": "0.1.0", + "homepage": "https://lapkipomoshi.github.io/help_paw_frontend/", "private": true, "dependencies": { "@pbe/react-yandex-maps": "^1.2.2", From 96478b24e91062b217810d62e1c0949567bc6a0f Mon Sep 17 00:00:00 2001 From: jingleMyBells <105673902+jingleMyBells@users.noreply.github.com> Date: Tue, 25 Apr 2023 17:33:22 +0300 Subject: [PATCH 02/51] Create pr_opened.yml --- .github/workflows/pr_opened.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/pr_opened.yml diff --git a/.github/workflows/pr_opened.yml b/.github/workflows/pr_opened.yml new file mode 100644 index 00000000..a434070b --- /dev/null +++ b/.github/workflows/pr_opened.yml @@ -0,0 +1,19 @@ +name: PR_OPENED TG ALERT + +on: + pull_request: + types: [opened] + branches: + - main + - test + +jobs: + send_message: + runs-on: ubuntu-latest + steps: + - name: send message + uses: appleboy/telegram-action@master + with: + to: ${{ secrets.ALERT_CHANNEL }} + token: ${{ secrets.BOT }} + message: ${{ github.actor }} открыл ${{ github.event_name }} ветки ${{ github.head_ref }} в ${{ github.base_ref }} From 531d9c86c312c60dc79553a26484b735083782f7 Mon Sep 17 00:00:00 2001 From: jingleMyBells <105673902+jingleMyBells@users.noreply.github.com> Date: Tue, 25 Apr 2023 17:35:13 +0300 Subject: [PATCH 03/51] Update pr_opened.yml --- .github/workflows/pr_opened.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_opened.yml b/.github/workflows/pr_opened.yml index a434070b..a9b423d0 100644 --- a/.github/workflows/pr_opened.yml +++ b/.github/workflows/pr_opened.yml @@ -16,4 +16,4 @@ jobs: with: to: ${{ secrets.ALERT_CHANNEL }} token: ${{ secrets.BOT }} - message: ${{ github.actor }} открыл ${{ github.event_name }} ветки ${{ github.head_ref }} в ${{ github.base_ref }} + message: FRONTEND - ${{ github.actor }} открыл ${{ github.event_name }} ветки ${{ github.head_ref }} в ${{ github.base_ref }} From 5219ee899fb423afc2ba928726f36ceb64f39214 Mon Sep 17 00:00:00 2001 From: jingleMyBells <105673902+jingleMyBells@users.noreply.github.com> Date: Tue, 25 Apr 2023 17:45:35 +0300 Subject: [PATCH 04/51] Create pr_closed.yml --- .github/workflows/pr_closed.yml | 84 +++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 .github/workflows/pr_closed.yml diff --git a/.github/workflows/pr_closed.yml b/.github/workflows/pr_closed.yml new file mode 100644 index 00000000..d6c26f12 --- /dev/null +++ b/.github/workflows/pr_closed.yml @@ -0,0 +1,84 @@ +name: PR_CLOSED DEPLOY AND TG ALERT + +on: + pull_request: + types: [closed] + branches: + - test + + +jobs: + build_and_push_to_docker_hub: + name: Push Docker image to Docker Hub + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Login to Docker + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Push to Docker Hub + uses: docker/build-push-action@v2 + with: + push: true + tags: jinglemybells/help_paw:test + + deploy: + runs-on: ubuntu-latest + needs: build_and_push_to_docker_hub + steps: + - name: executing remote ssh commands to deploy + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.TEST_HOST }} + username: ${{ secrets.USER }} + password: ${{ secrets.PASSWORD }} + script: | + cd ~/test + sudo docker-compose stop + rm .env + touch .env + echo DB_ENGINE=${{ secrets.DB_ENGINE }} >> .env + echo DB_NAME=${{ secrets.DB_NAME }} >> .env + echo POSTGRES_USER=${{ secrets.POSTGRES_USER }} >> .env + echo POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }} >> .env + echo DB_HOST=${{ secrets.DB_HOST }} >> .env + echo DB_PORT=${{ secrets.DB_PORT }} >> .env + echo D_KEY=${{ secrets.D_KEY }} >> .env + echo LOCAL=${{ secrets.LOCAL }} >> .env + echo BOT=${{ secrets.BOT }} >> .env + echo ALERT_CHANNEL=${{ secrets.ALERT_CHANNEL }} >> .env + echo EMAIL_HOST=${{ secrets.EMAIL_HOST }} >> .env + echo EMAIL_PORT=${{ secrets.EMAIL_PORT }} >> .env + echo EMAIL_HOST_USER=${{ secrets.EMAIL_HOST_USER }} >> .env + echo EMAIL_HOST_PASSWORD=${{ secrets.EMAIL_HOST_PASSWORD }} >> .env + echo EMAIL_USE_SSL=${{ secrets.EMAIL_USE_SSL }} >> .env + echo EMAIL_USE_TLS=${{ secrets.EMAIL_USE_TLS }} >> .env + echo DEBUG=${{ secrets.DEBUG }} >> .env + echo EMAIL_BACKEND_TYPE=${{ secrets.EMAIL_BACKEND_TYPE }} >> .env + sudo docker-compose pull + sudo docker-compose up -d + + send_message: + runs-on: ubuntu-latest + needs: deploy + steps: + - name: send message + if: github.event.pull_request.merged == true + uses: appleboy/telegram-action@master + with: + to: ${{ secrets.ALERT_CHANNEL }} + token: ${{ secrets.BOT }} + message: FRONTEND - ${{ github.event_name }} ветки ${{ github.head_ref }} успешно смержен в ${{ github.base_ref }}, TEST обновлен и перезапущен + - name: send message merged + if: github.event.pull_request.merged == false + uses: appleboy/telegram-action@master + with: + to: ${{ secrets.ALERT_CHANNEL }} + token: ${{ secrets.BOT }} + message: FRONTEND - ${{ github.event_name }} ветки ${{ github.head_ref }} в ${{ github.base_ref }} закрыт без мержа, деплой не производился. From 5436935bced09f1114b3ef1929b4abc71285c139 Mon Sep 17 00:00:00 2001 From: jingleMyBells <105673902+jingleMyBells@users.noreply.github.com> Date: Tue, 25 Apr 2023 17:46:54 +0300 Subject: [PATCH 05/51] Rename pr_closed.yml to pr_closed_test.yml --- .github/workflows/{pr_closed.yml => pr_closed_test.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{pr_closed.yml => pr_closed_test.yml} (100%) diff --git a/.github/workflows/pr_closed.yml b/.github/workflows/pr_closed_test.yml similarity index 100% rename from .github/workflows/pr_closed.yml rename to .github/workflows/pr_closed_test.yml From 3b73f6d38caa366536800a06e1afa3fa3ff2f51e Mon Sep 17 00:00:00 2001 From: jingleMyBells <105673902+jingleMyBells@users.noreply.github.com> Date: Tue, 25 Apr 2023 17:47:56 +0300 Subject: [PATCH 06/51] Create pr_closed.yml --- .github/workflows/pr_closed.yml | 84 +++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 .github/workflows/pr_closed.yml diff --git a/.github/workflows/pr_closed.yml b/.github/workflows/pr_closed.yml new file mode 100644 index 00000000..6de1de9b --- /dev/null +++ b/.github/workflows/pr_closed.yml @@ -0,0 +1,84 @@ +name: PR_CLOSED DEPLOY AND TG ALERT + +on: + pull_request: + types: [closed] + branches: + - main + + +jobs: + build_and_push_to_docker_hub: + name: Push Docker image to Docker Hub + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Login to Docker + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Push to Docker Hub + uses: docker/build-push-action@v2 + with: + push: true + tags: jinglemybells/help_paw:latest + + deploy: + runs-on: ubuntu-latest + needs: build_and_push_to_docker_hub + steps: + - name: executing remote ssh commands to deploy + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USER }} + password: ${{ secrets.PASSWORD }} + script: | + cd ~/test + sudo docker-compose stop + rm .env + touch .env + echo DB_ENGINE=${{ secrets.DB_ENGINE }} >> .env + echo DB_NAME=${{ secrets.DB_NAME }} >> .env + echo POSTGRES_USER=${{ secrets.POSTGRES_USER }} >> .env + echo POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }} >> .env + echo DB_HOST=${{ secrets.DB_HOST }} >> .env + echo DB_PORT=${{ secrets.DB_PORT }} >> .env + echo D_KEY=${{ secrets.D_KEY }} >> .env + echo LOCAL=${{ secrets.LOCAL }} >> .env + echo BOT=${{ secrets.BOT }} >> .env + echo ALERT_CHANNEL=${{ secrets.ALERT_CHANNEL }} >> .env + echo EMAIL_HOST=${{ secrets.EMAIL_HOST }} >> .env + echo EMAIL_PORT=${{ secrets.EMAIL_PORT }} >> .env + echo EMAIL_HOST_USER=${{ secrets.EMAIL_HOST_USER }} >> .env + echo EMAIL_HOST_PASSWORD=${{ secrets.EMAIL_HOST_PASSWORD }} >> .env + echo EMAIL_USE_SSL=${{ secrets.EMAIL_USE_SSL }} >> .env + echo EMAIL_USE_TLS=${{ secrets.EMAIL_USE_TLS }} >> .env + echo DEBUG=${{ secrets.DEBUG }} >> .env + echo EMAIL_BACKEND_TYPE=${{ secrets.EMAIL_BACKEND_TYPE }} >> .env + sudo docker-compose pull + sudo docker-compose up -d + + send_message: + runs-on: ubuntu-latest + needs: deploy + steps: + - name: send message + if: github.event.pull_request.merged == true + uses: appleboy/telegram-action@master + with: + to: ${{ secrets.ALERT_CHANNEL }} + token: ${{ secrets.BOT }} + message: FRONTEND - ${{ github.event_name }} ветки ${{ github.head_ref }} успешно смержен в ${{ github.base_ref }}, LAPKIPOMOSHI.RU обновлен и перезапущен + - name: send message merged + if: github.event.pull_request.merged == false + uses: appleboy/telegram-action@master + with: + to: ${{ secrets.ALERT_CHANNEL }} + token: ${{ secrets.BOT }} + message: FRONTEND - ${{ github.event_name }} ветки ${{ github.head_ref }} в ${{ github.base_ref }} закрыт без мержа, деплой не производился. From d848a6c90b6dee4ca6e4fd46627b4ea8ffd99865 Mon Sep 17 00:00:00 2001 From: jingleMyBells <105673902+jingleMyBells@users.noreply.github.com> Date: Wed, 26 Apr 2023 00:56:07 +0300 Subject: [PATCH 07/51] Update pr_closed_test.yml --- .github/workflows/pr_closed_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_closed_test.yml b/.github/workflows/pr_closed_test.yml index d6c26f12..f660f1a2 100644 --- a/.github/workflows/pr_closed_test.yml +++ b/.github/workflows/pr_closed_test.yml @@ -26,7 +26,7 @@ jobs: uses: docker/build-push-action@v2 with: push: true - tags: jinglemybells/help_paw:test + tags: jinglemybells/help_paw_f:test deploy: runs-on: ubuntu-latest From dfd7d38d4139d563f32163cc08625a1e4b9ae32b Mon Sep 17 00:00:00 2001 From: jingleMyBells <105673902+jingleMyBells@users.noreply.github.com> Date: Wed, 26 Apr 2023 00:56:26 +0300 Subject: [PATCH 08/51] Update pr_closed.yml --- .github/workflows/pr_closed.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_closed.yml b/.github/workflows/pr_closed.yml index 6de1de9b..5ea9181b 100644 --- a/.github/workflows/pr_closed.yml +++ b/.github/workflows/pr_closed.yml @@ -26,7 +26,7 @@ jobs: uses: docker/build-push-action@v2 with: push: true - tags: jinglemybells/help_paw:latest + tags: jinglemybells/help_paw_f:latest deploy: runs-on: ubuntu-latest From 128abac93c1ee1c681be657cf0b5ed3a3fc72b84 Mon Sep 17 00:00:00 2001 From: jingleMyBells <105673902+jingleMyBells@users.noreply.github.com> Date: Wed, 26 Apr 2023 13:40:33 +0300 Subject: [PATCH 09/51] Update pr_closed_test.yml --- .github/workflows/pr_closed_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_closed_test.yml b/.github/workflows/pr_closed_test.yml index f660f1a2..b7c04ced 100644 --- a/.github/workflows/pr_closed_test.yml +++ b/.github/workflows/pr_closed_test.yml @@ -59,7 +59,7 @@ jobs: echo EMAIL_HOST_PASSWORD=${{ secrets.EMAIL_HOST_PASSWORD }} >> .env echo EMAIL_USE_SSL=${{ secrets.EMAIL_USE_SSL }} >> .env echo EMAIL_USE_TLS=${{ secrets.EMAIL_USE_TLS }} >> .env - echo DEBUG=${{ secrets.DEBUG }} >> .env + echo DEBUG=${{ secrets.TEST_DEBUG }} >> .env echo EMAIL_BACKEND_TYPE=${{ secrets.EMAIL_BACKEND_TYPE }} >> .env sudo docker-compose pull sudo docker-compose up -d From e68e338036a7ff21bb7b2cfc1ec9616117c69d67 Mon Sep 17 00:00:00 2001 From: jingleMyBells <105673902+jingleMyBells@users.noreply.github.com> Date: Wed, 3 May 2023 01:28:06 +0300 Subject: [PATCH 10/51] Update pr_closed_test.yml --- .github/workflows/pr_closed_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr_closed_test.yml b/.github/workflows/pr_closed_test.yml index b7c04ced..0801879e 100644 --- a/.github/workflows/pr_closed_test.yml +++ b/.github/workflows/pr_closed_test.yml @@ -61,6 +61,7 @@ jobs: echo EMAIL_USE_TLS=${{ secrets.EMAIL_USE_TLS }} >> .env echo DEBUG=${{ secrets.TEST_DEBUG }} >> .env echo EMAIL_BACKEND_TYPE=${{ secrets.EMAIL_BACKEND_TYPE }} >> .env + echo REACT_APP_SERVER_TYPE=${{ secrets.REACT_APP_SERVER_TYPE_TEST }} >> .env sudo docker-compose pull sudo docker-compose up -d From cc4c9b0f2a5568fa5bfbcb683213f3b7eb66fc12 Mon Sep 17 00:00:00 2001 From: jingleMyBells <105673902+jingleMyBells@users.noreply.github.com> Date: Wed, 12 Jul 2023 16:39:44 +0300 Subject: [PATCH 11/51] Update pr_closed.yml --- .github/workflows/pr_closed.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_closed.yml b/.github/workflows/pr_closed.yml index 5ea9181b..4d08a068 100644 --- a/.github/workflows/pr_closed.yml +++ b/.github/workflows/pr_closed.yml @@ -26,7 +26,7 @@ jobs: uses: docker/build-push-action@v2 with: push: true - tags: jinglemybells/help_paw_f:latest + tags: lapkipomoshi/help_paw_f:latest deploy: runs-on: ubuntu-latest From 4b37e4f3adf782c70d37efbba5db107c6cf7141c Mon Sep 17 00:00:00 2001 From: jingleMyBells <105673902+jingleMyBells@users.noreply.github.com> Date: Wed, 12 Jul 2023 16:40:20 +0300 Subject: [PATCH 12/51] Update pr_closed_test.yml --- .github/workflows/pr_closed_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_closed_test.yml b/.github/workflows/pr_closed_test.yml index 0801879e..23205c2b 100644 --- a/.github/workflows/pr_closed_test.yml +++ b/.github/workflows/pr_closed_test.yml @@ -26,7 +26,7 @@ jobs: uses: docker/build-push-action@v2 with: push: true - tags: jinglemybells/help_paw_f:test + tags: lapkipomoshi/help_paw_f:test deploy: runs-on: ubuntu-latest From 00db52c8c8bcd6bac36441ec64aa713cb02412f9 Mon Sep 17 00:00:00 2001 From: deusbog Date: Tue, 15 Aug 2023 14:18:56 +0300 Subject: [PATCH 13/51] deleted .github --- .github/workflows/pr_closed.yml | 84 --------------------------- .github/workflows/pr_closed_test.yml | 85 ---------------------------- .github/workflows/pr_opened.yml | 19 ------- 3 files changed, 188 deletions(-) delete mode 100644 .github/workflows/pr_closed.yml delete mode 100644 .github/workflows/pr_closed_test.yml delete mode 100644 .github/workflows/pr_opened.yml diff --git a/.github/workflows/pr_closed.yml b/.github/workflows/pr_closed.yml deleted file mode 100644 index 4d08a068..00000000 --- a/.github/workflows/pr_closed.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: PR_CLOSED DEPLOY AND TG ALERT - -on: - pull_request: - types: [closed] - branches: - - main - - -jobs: - build_and_push_to_docker_hub: - name: Push Docker image to Docker Hub - if: github.event.pull_request.merged == true - runs-on: ubuntu-latest - steps: - - name: Check out the repo - uses: actions/checkout@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to Docker - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Push to Docker Hub - uses: docker/build-push-action@v2 - with: - push: true - tags: lapkipomoshi/help_paw_f:latest - - deploy: - runs-on: ubuntu-latest - needs: build_and_push_to_docker_hub - steps: - - name: executing remote ssh commands to deploy - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USER }} - password: ${{ secrets.PASSWORD }} - script: | - cd ~/test - sudo docker-compose stop - rm .env - touch .env - echo DB_ENGINE=${{ secrets.DB_ENGINE }} >> .env - echo DB_NAME=${{ secrets.DB_NAME }} >> .env - echo POSTGRES_USER=${{ secrets.POSTGRES_USER }} >> .env - echo POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }} >> .env - echo DB_HOST=${{ secrets.DB_HOST }} >> .env - echo DB_PORT=${{ secrets.DB_PORT }} >> .env - echo D_KEY=${{ secrets.D_KEY }} >> .env - echo LOCAL=${{ secrets.LOCAL }} >> .env - echo BOT=${{ secrets.BOT }} >> .env - echo ALERT_CHANNEL=${{ secrets.ALERT_CHANNEL }} >> .env - echo EMAIL_HOST=${{ secrets.EMAIL_HOST }} >> .env - echo EMAIL_PORT=${{ secrets.EMAIL_PORT }} >> .env - echo EMAIL_HOST_USER=${{ secrets.EMAIL_HOST_USER }} >> .env - echo EMAIL_HOST_PASSWORD=${{ secrets.EMAIL_HOST_PASSWORD }} >> .env - echo EMAIL_USE_SSL=${{ secrets.EMAIL_USE_SSL }} >> .env - echo EMAIL_USE_TLS=${{ secrets.EMAIL_USE_TLS }} >> .env - echo DEBUG=${{ secrets.DEBUG }} >> .env - echo EMAIL_BACKEND_TYPE=${{ secrets.EMAIL_BACKEND_TYPE }} >> .env - sudo docker-compose pull - sudo docker-compose up -d - - send_message: - runs-on: ubuntu-latest - needs: deploy - steps: - - name: send message - if: github.event.pull_request.merged == true - uses: appleboy/telegram-action@master - with: - to: ${{ secrets.ALERT_CHANNEL }} - token: ${{ secrets.BOT }} - message: FRONTEND - ${{ github.event_name }} ветки ${{ github.head_ref }} успешно смержен в ${{ github.base_ref }}, LAPKIPOMOSHI.RU обновлен и перезапущен - - name: send message merged - if: github.event.pull_request.merged == false - uses: appleboy/telegram-action@master - with: - to: ${{ secrets.ALERT_CHANNEL }} - token: ${{ secrets.BOT }} - message: FRONTEND - ${{ github.event_name }} ветки ${{ github.head_ref }} в ${{ github.base_ref }} закрыт без мержа, деплой не производился. diff --git a/.github/workflows/pr_closed_test.yml b/.github/workflows/pr_closed_test.yml deleted file mode 100644 index 23205c2b..00000000 --- a/.github/workflows/pr_closed_test.yml +++ /dev/null @@ -1,85 +0,0 @@ -name: PR_CLOSED DEPLOY AND TG ALERT - -on: - pull_request: - types: [closed] - branches: - - test - - -jobs: - build_and_push_to_docker_hub: - name: Push Docker image to Docker Hub - if: github.event.pull_request.merged == true - runs-on: ubuntu-latest - steps: - - name: Check out the repo - uses: actions/checkout@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to Docker - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Push to Docker Hub - uses: docker/build-push-action@v2 - with: - push: true - tags: lapkipomoshi/help_paw_f:test - - deploy: - runs-on: ubuntu-latest - needs: build_and_push_to_docker_hub - steps: - - name: executing remote ssh commands to deploy - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.TEST_HOST }} - username: ${{ secrets.USER }} - password: ${{ secrets.PASSWORD }} - script: | - cd ~/test - sudo docker-compose stop - rm .env - touch .env - echo DB_ENGINE=${{ secrets.DB_ENGINE }} >> .env - echo DB_NAME=${{ secrets.DB_NAME }} >> .env - echo POSTGRES_USER=${{ secrets.POSTGRES_USER }} >> .env - echo POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }} >> .env - echo DB_HOST=${{ secrets.DB_HOST }} >> .env - echo DB_PORT=${{ secrets.DB_PORT }} >> .env - echo D_KEY=${{ secrets.D_KEY }} >> .env - echo LOCAL=${{ secrets.LOCAL }} >> .env - echo BOT=${{ secrets.BOT }} >> .env - echo ALERT_CHANNEL=${{ secrets.ALERT_CHANNEL }} >> .env - echo EMAIL_HOST=${{ secrets.EMAIL_HOST }} >> .env - echo EMAIL_PORT=${{ secrets.EMAIL_PORT }} >> .env - echo EMAIL_HOST_USER=${{ secrets.EMAIL_HOST_USER }} >> .env - echo EMAIL_HOST_PASSWORD=${{ secrets.EMAIL_HOST_PASSWORD }} >> .env - echo EMAIL_USE_SSL=${{ secrets.EMAIL_USE_SSL }} >> .env - echo EMAIL_USE_TLS=${{ secrets.EMAIL_USE_TLS }} >> .env - echo DEBUG=${{ secrets.TEST_DEBUG }} >> .env - echo EMAIL_BACKEND_TYPE=${{ secrets.EMAIL_BACKEND_TYPE }} >> .env - echo REACT_APP_SERVER_TYPE=${{ secrets.REACT_APP_SERVER_TYPE_TEST }} >> .env - sudo docker-compose pull - sudo docker-compose up -d - - send_message: - runs-on: ubuntu-latest - needs: deploy - steps: - - name: send message - if: github.event.pull_request.merged == true - uses: appleboy/telegram-action@master - with: - to: ${{ secrets.ALERT_CHANNEL }} - token: ${{ secrets.BOT }} - message: FRONTEND - ${{ github.event_name }} ветки ${{ github.head_ref }} успешно смержен в ${{ github.base_ref }}, TEST обновлен и перезапущен - - name: send message merged - if: github.event.pull_request.merged == false - uses: appleboy/telegram-action@master - with: - to: ${{ secrets.ALERT_CHANNEL }} - token: ${{ secrets.BOT }} - message: FRONTEND - ${{ github.event_name }} ветки ${{ github.head_ref }} в ${{ github.base_ref }} закрыт без мержа, деплой не производился. diff --git a/.github/workflows/pr_opened.yml b/.github/workflows/pr_opened.yml deleted file mode 100644 index a9b423d0..00000000 --- a/.github/workflows/pr_opened.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: PR_OPENED TG ALERT - -on: - pull_request: - types: [opened] - branches: - - main - - test - -jobs: - send_message: - runs-on: ubuntu-latest - steps: - - name: send message - uses: appleboy/telegram-action@master - with: - to: ${{ secrets.ALERT_CHANNEL }} - token: ${{ secrets.BOT }} - message: FRONTEND - ${{ github.actor }} открыл ${{ github.event_name }} ветки ${{ github.head_ref }} в ${{ github.base_ref }} From 429237421a93b465e6fcea66cfcf38680e744f9b Mon Sep 17 00:00:00 2001 From: deusbog Date: Tue, 15 Aug 2023 14:29:35 +0300 Subject: [PATCH 14/51] added .github --- .github/workflows/pr_closed.yml | 84 +++++++++++++++++++++++++++ .github/workflows/pr_closed_test.yml | 85 ++++++++++++++++++++++++++++ .github/workflows/pr_opened.yml | 19 +++++++ 3 files changed, 188 insertions(+) create mode 100644 .github/workflows/pr_closed.yml create mode 100644 .github/workflows/pr_closed_test.yml create mode 100644 .github/workflows/pr_opened.yml diff --git a/.github/workflows/pr_closed.yml b/.github/workflows/pr_closed.yml new file mode 100644 index 00000000..4d08a068 --- /dev/null +++ b/.github/workflows/pr_closed.yml @@ -0,0 +1,84 @@ +name: PR_CLOSED DEPLOY AND TG ALERT + +on: + pull_request: + types: [closed] + branches: + - main + + +jobs: + build_and_push_to_docker_hub: + name: Push Docker image to Docker Hub + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Login to Docker + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Push to Docker Hub + uses: docker/build-push-action@v2 + with: + push: true + tags: lapkipomoshi/help_paw_f:latest + + deploy: + runs-on: ubuntu-latest + needs: build_and_push_to_docker_hub + steps: + - name: executing remote ssh commands to deploy + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USER }} + password: ${{ secrets.PASSWORD }} + script: | + cd ~/test + sudo docker-compose stop + rm .env + touch .env + echo DB_ENGINE=${{ secrets.DB_ENGINE }} >> .env + echo DB_NAME=${{ secrets.DB_NAME }} >> .env + echo POSTGRES_USER=${{ secrets.POSTGRES_USER }} >> .env + echo POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }} >> .env + echo DB_HOST=${{ secrets.DB_HOST }} >> .env + echo DB_PORT=${{ secrets.DB_PORT }} >> .env + echo D_KEY=${{ secrets.D_KEY }} >> .env + echo LOCAL=${{ secrets.LOCAL }} >> .env + echo BOT=${{ secrets.BOT }} >> .env + echo ALERT_CHANNEL=${{ secrets.ALERT_CHANNEL }} >> .env + echo EMAIL_HOST=${{ secrets.EMAIL_HOST }} >> .env + echo EMAIL_PORT=${{ secrets.EMAIL_PORT }} >> .env + echo EMAIL_HOST_USER=${{ secrets.EMAIL_HOST_USER }} >> .env + echo EMAIL_HOST_PASSWORD=${{ secrets.EMAIL_HOST_PASSWORD }} >> .env + echo EMAIL_USE_SSL=${{ secrets.EMAIL_USE_SSL }} >> .env + echo EMAIL_USE_TLS=${{ secrets.EMAIL_USE_TLS }} >> .env + echo DEBUG=${{ secrets.DEBUG }} >> .env + echo EMAIL_BACKEND_TYPE=${{ secrets.EMAIL_BACKEND_TYPE }} >> .env + sudo docker-compose pull + sudo docker-compose up -d + + send_message: + runs-on: ubuntu-latest + needs: deploy + steps: + - name: send message + if: github.event.pull_request.merged == true + uses: appleboy/telegram-action@master + with: + to: ${{ secrets.ALERT_CHANNEL }} + token: ${{ secrets.BOT }} + message: FRONTEND - ${{ github.event_name }} ветки ${{ github.head_ref }} успешно смержен в ${{ github.base_ref }}, LAPKIPOMOSHI.RU обновлен и перезапущен + - name: send message merged + if: github.event.pull_request.merged == false + uses: appleboy/telegram-action@master + with: + to: ${{ secrets.ALERT_CHANNEL }} + token: ${{ secrets.BOT }} + message: FRONTEND - ${{ github.event_name }} ветки ${{ github.head_ref }} в ${{ github.base_ref }} закрыт без мержа, деплой не производился. diff --git a/.github/workflows/pr_closed_test.yml b/.github/workflows/pr_closed_test.yml new file mode 100644 index 00000000..23205c2b --- /dev/null +++ b/.github/workflows/pr_closed_test.yml @@ -0,0 +1,85 @@ +name: PR_CLOSED DEPLOY AND TG ALERT + +on: + pull_request: + types: [closed] + branches: + - test + + +jobs: + build_and_push_to_docker_hub: + name: Push Docker image to Docker Hub + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Login to Docker + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Push to Docker Hub + uses: docker/build-push-action@v2 + with: + push: true + tags: lapkipomoshi/help_paw_f:test + + deploy: + runs-on: ubuntu-latest + needs: build_and_push_to_docker_hub + steps: + - name: executing remote ssh commands to deploy + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.TEST_HOST }} + username: ${{ secrets.USER }} + password: ${{ secrets.PASSWORD }} + script: | + cd ~/test + sudo docker-compose stop + rm .env + touch .env + echo DB_ENGINE=${{ secrets.DB_ENGINE }} >> .env + echo DB_NAME=${{ secrets.DB_NAME }} >> .env + echo POSTGRES_USER=${{ secrets.POSTGRES_USER }} >> .env + echo POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }} >> .env + echo DB_HOST=${{ secrets.DB_HOST }} >> .env + echo DB_PORT=${{ secrets.DB_PORT }} >> .env + echo D_KEY=${{ secrets.D_KEY }} >> .env + echo LOCAL=${{ secrets.LOCAL }} >> .env + echo BOT=${{ secrets.BOT }} >> .env + echo ALERT_CHANNEL=${{ secrets.ALERT_CHANNEL }} >> .env + echo EMAIL_HOST=${{ secrets.EMAIL_HOST }} >> .env + echo EMAIL_PORT=${{ secrets.EMAIL_PORT }} >> .env + echo EMAIL_HOST_USER=${{ secrets.EMAIL_HOST_USER }} >> .env + echo EMAIL_HOST_PASSWORD=${{ secrets.EMAIL_HOST_PASSWORD }} >> .env + echo EMAIL_USE_SSL=${{ secrets.EMAIL_USE_SSL }} >> .env + echo EMAIL_USE_TLS=${{ secrets.EMAIL_USE_TLS }} >> .env + echo DEBUG=${{ secrets.TEST_DEBUG }} >> .env + echo EMAIL_BACKEND_TYPE=${{ secrets.EMAIL_BACKEND_TYPE }} >> .env + echo REACT_APP_SERVER_TYPE=${{ secrets.REACT_APP_SERVER_TYPE_TEST }} >> .env + sudo docker-compose pull + sudo docker-compose up -d + + send_message: + runs-on: ubuntu-latest + needs: deploy + steps: + - name: send message + if: github.event.pull_request.merged == true + uses: appleboy/telegram-action@master + with: + to: ${{ secrets.ALERT_CHANNEL }} + token: ${{ secrets.BOT }} + message: FRONTEND - ${{ github.event_name }} ветки ${{ github.head_ref }} успешно смержен в ${{ github.base_ref }}, TEST обновлен и перезапущен + - name: send message merged + if: github.event.pull_request.merged == false + uses: appleboy/telegram-action@master + with: + to: ${{ secrets.ALERT_CHANNEL }} + token: ${{ secrets.BOT }} + message: FRONTEND - ${{ github.event_name }} ветки ${{ github.head_ref }} в ${{ github.base_ref }} закрыт без мержа, деплой не производился. diff --git a/.github/workflows/pr_opened.yml b/.github/workflows/pr_opened.yml new file mode 100644 index 00000000..a9b423d0 --- /dev/null +++ b/.github/workflows/pr_opened.yml @@ -0,0 +1,19 @@ +name: PR_OPENED TG ALERT + +on: + pull_request: + types: [opened] + branches: + - main + - test + +jobs: + send_message: + runs-on: ubuntu-latest + steps: + - name: send message + uses: appleboy/telegram-action@master + with: + to: ${{ secrets.ALERT_CHANNEL }} + token: ${{ secrets.BOT }} + message: FRONTEND - ${{ github.actor }} открыл ${{ github.event_name }} ветки ${{ github.head_ref }} в ${{ github.base_ref }} From a7710a3e45c600ada098e892081d9103983208cd Mon Sep 17 00:00:00 2001 From: TatianaP Date: Tue, 15 Aug 2023 15:46:02 +0400 Subject: [PATCH 15/51] fix: test --- src/pages/PrivacyPolicyPage/constants.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/PrivacyPolicyPage/constants.js b/src/pages/PrivacyPolicyPage/constants.js index 7addd8bc..875efedb 100644 --- a/src/pages/PrivacyPolicyPage/constants.js +++ b/src/pages/PrivacyPolicyPage/constants.js @@ -25,7 +25,6 @@ const dataPrivacyPolicy = [ которую Оператор может получить о посетителях веб-сайта https://lapkipomoshi.ru/.`, ], }, - { id: 2, rendererComponent: ParagraphList, From 4c47425dfcbe5db4a33a3678b94fbb29bdd22075 Mon Sep 17 00:00:00 2001 From: Tatiana Ponomareva Date: Tue, 15 Aug 2023 15:57:57 +0400 Subject: [PATCH 16/51] Dev (#162) * Test (#160) * Revert "fix" * Create pr_closed.yml From e8454efc7b10b3bfe8baf319824369ae9d59d9f4 Mon Sep 17 00:00:00 2001 From: Tatiana Ponomareva Date: Mon, 21 Aug 2023 18:53:15 +0400 Subject: [PATCH 17/51] fix: github fix test stand (#164) --- src/components/VacancyCard/VacancyCard.jsx | 6 +- .../vacancy-card__icon-button.scss | 2 - .../EditPenIcon.jsx => EditIcon/EditIcon.jsx} | 6 +- .../EditIcon.scss} | 0 src/modules/AboutShelter/AboutShelter.jsx | 4 +- .../about-shelter__icon-button.scss | 2 +- .../AddVacancyForm/AddVacancyForm.jsx | 153 +++++++++++++++++ .../AddVacancyForm/AddVacancyForm.scss | 39 +++++ .../ShelterVacancies/ShelterVacancies.jsx | 33 ++-- .../ShelterVacancies/ShelterVacancies.scss | 14 +- src/modules/ShelterVacancies/VacancyList.jsx | 30 ++++ .../__column/add-shelter-form__column.css | 3 +- .../__flex/add-shelter-form__flex.css | 3 +- src/ui/DeclarationInput/DeclarationInput.jsx | 14 +- src/ui/DeclarationInput/DeclarationInput.scss | 4 +- src/ui/Select/OptionList.jsx | 27 +++ src/ui/Select/Select.jsx | 95 +++++++++++ src/ui/Select/Select.scss | 161 ++++++++++++++++++ src/ui/Select/svg/Arrow.css | 16 ++ src/ui/Select/svg/Arrow.jsx | 17 ++ src/utils/errorMessage.js | 29 +++- 21 files changed, 610 insertions(+), 48 deletions(-) rename src/images/{EditPenIcon/EditPenIcon.jsx => EditIcon/EditIcon.jsx} (89%) rename src/images/{EditPenIcon/EditPenIcon.scss => EditIcon/EditIcon.scss} (100%) create mode 100644 src/modules/ShelterVacancies/AddVacancyForm/AddVacancyForm.jsx create mode 100644 src/modules/ShelterVacancies/AddVacancyForm/AddVacancyForm.scss create mode 100644 src/modules/ShelterVacancies/VacancyList.jsx create mode 100644 src/ui/Select/OptionList.jsx create mode 100644 src/ui/Select/Select.jsx create mode 100644 src/ui/Select/Select.scss create mode 100644 src/ui/Select/svg/Arrow.css create mode 100644 src/ui/Select/svg/Arrow.jsx diff --git a/src/components/VacancyCard/VacancyCard.jsx b/src/components/VacancyCard/VacancyCard.jsx index 63573737..383d4f8a 100644 --- a/src/components/VacancyCard/VacancyCard.jsx +++ b/src/components/VacancyCard/VacancyCard.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { useOutletContext } from 'react-router-dom'; import './VacancyCard.scss'; -import EditPenIcon from '../../images/EditPenIcon/EditPenIcon'; +import EditIcon from '../../images/EditIcon/EditIcon'; import DeleteIcon from '../../images/DeleteIcon/DeleteIcon'; const VacancyCard = ({ title, salary, schedule, description, education, isLoading }) => { @@ -18,9 +18,9 @@ const VacancyCard = ({ title, salary, schedule, description, education, isLoadin {isOwner && ( <> - {/* TODO функционал реализую в след PR */} + {/* TODO функционал реализую в след PR */} {/* TODO DeleteIcon функционал реализую в след PR */}